Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Commit 
							
							·
						
						8f82c46
	
1
								Parent(s):
							
							fc2ea32
								
Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -107,7 +107,7 @@ def tsaigpt(start:str , max_new_tokens = 300, num_samples =2, tokeniser= token): | |
| 107 | 
             
                device_type = 'cuda' if 'cuda' in device else 'cpu' # for later use in torch.autocast
         | 
| 108 | 
             
                ptdtype = {'float32': torch.float32, 'bfloat16': torch.bfloat16, 'float16': torch.float16}[dtype]
         | 
| 109 | 
             
                ctx = nullcontext() if device_type == 'cpu' else torch.amp.autocast(device_type=device_type, dtype=ptdtype)
         | 
| 110 | 
            -
                checkpoint_path = Path("out/redpajama/iter- | 
| 111 | 
             
                config = Config.from_name(model_name)
         | 
| 112 | 
             
                model = GPT(config)
         | 
| 113 |  | 
|  | |
| 107 | 
             
                device_type = 'cuda' if 'cuda' in device else 'cpu' # for later use in torch.autocast
         | 
| 108 | 
             
                ptdtype = {'float32': torch.float32, 'bfloat16': torch.bfloat16, 'float16': torch.float16}[dtype]
         | 
| 109 | 
             
                ctx = nullcontext() if device_type == 'cpu' else torch.amp.autocast(device_type=device_type, dtype=ptdtype)
         | 
| 110 | 
            +
                checkpoint_path = Path("out/redpajama/iter-031997-ckpt.pth")
         | 
| 111 | 
             
                config = Config.from_name(model_name)
         | 
| 112 | 
             
                model = GPT(config)
         | 
| 113 |  |