Upload cerebras_GLM-4.5-Air-REAP-82B-A12B_1.py with huggingface_hub
Browse files
    	
        cerebras_GLM-4.5-Air-REAP-82B-A12B_1.py
    CHANGED
    
    | @@ -42,8 +42,7 @@ except Exception as e: | |
| 42 |  | 
| 43 | 
             
                with open('cerebras_GLM-4.5-Air-REAP-82B-A12B_1.txt', 'a', encoding='utf-8') as f:
         | 
| 44 | 
             
                    import traceback
         | 
| 45 | 
            -
                    f.write('''
         | 
| 46 | 
            -
            ```CODE: 
         | 
| 47 | 
             
            # Load model directly
         | 
| 48 | 
             
            from transformers import AutoTokenizer, AutoModelForCausalLM
         | 
| 49 |  | 
| @@ -63,6 +62,7 @@ inputs = tokenizer.apply_chat_template( | |
| 63 | 
             
            outputs = model.generate(**inputs, max_new_tokens=40)
         | 
| 64 | 
             
            print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
         | 
| 65 | 
             
            ```
         | 
|  | |
| 66 | 
             
            ERROR: 
         | 
| 67 | 
             
            ''')
         | 
| 68 | 
             
                    traceback.print_exc(file=f)
         | 
|  | |
| 42 |  | 
| 43 | 
             
                with open('cerebras_GLM-4.5-Air-REAP-82B-A12B_1.txt', 'a', encoding='utf-8') as f:
         | 
| 44 | 
             
                    import traceback
         | 
| 45 | 
            +
                    f.write('''```CODE: 
         | 
|  | |
| 46 | 
             
            # Load model directly
         | 
| 47 | 
             
            from transformers import AutoTokenizer, AutoModelForCausalLM
         | 
| 48 |  | 
|  | |
| 62 | 
             
            outputs = model.generate(**inputs, max_new_tokens=40)
         | 
| 63 | 
             
            print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
         | 
| 64 | 
             
            ```
         | 
| 65 | 
            +
             | 
| 66 | 
             
            ERROR: 
         | 
| 67 | 
             
            ''')
         | 
| 68 | 
             
                    traceback.print_exc(file=f)
         | 
