Qurtana commited on
Commit
9aae007
·
verified ·
1 Parent(s): ed15528

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -1
README.md CHANGED
@@ -31,7 +31,21 @@ I strongly believe that this should achieve better performance than the original
31
 
32
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
33
 
34
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  Dataset Citation:
37
  ```@misc{numina_math_datasets,
 
31
 
32
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
33
 
34
+ This is what I used to load the model using AutoClasses:
35
+ ```!pip install -q transformers accelerate
36
+ from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
37
+
38
+ # Define the revision you want to use
39
+ revision = "main" # or any other valid revision/branch name
40
+
41
+ # Load the config, model, and tokenizer with the specified revision
42
+ config = AutoConfig.from_pretrained("Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR", revision=revision)
43
+ # Use AutoModelForCausalLM instead of AutoModel for this model
44
+ model = AutoModelForCausalLM.from_pretrained("Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR",
45
+ revision=revision,
46
+ config=config,
47
+ ignore_mismatched_sizes=True) # Add this line to ignore mismatched sizes
48
+ tokenizer = AutoTokenizer.from_pretrained("Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR", revision=revision)```
49
 
50
  Dataset Citation:
51
  ```@misc{numina_math_datasets,