Mo-alaa commited on
Commit
f9663c7
1 Parent(s): 3bc4b9c

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +6 -8
model.py CHANGED
@@ -1,9 +1,7 @@
1
  from transformers import AutoModelForCausalLM, AutoTokenizer
2
- def create_model():
3
- tokenizer = AutoTokenizer.from_pretrained('stabilityai/stablelm-zephyr-3b')
4
- model = AutoModelForCausalLM.from_pretrained(
5
- 'stabilityai/stablelm-zephyr-3b',
6
- trust_remote_code=True,
7
- device_map="auto"
8
- )
9
- return model,tokenizer
 
1
  from transformers import AutoModelForCausalLM, AutoTokenizer
2
+ tokenizer = AutoTokenizer.from_pretrained('stabilityai/stablelm-zephyr-3b')
3
+ model = AutoModelForCausalLM.from_pretrained(
4
+ 'stabilityai/stablelm-zephyr-3b',
5
+ trust_remote_code=True,
6
+ device_map="auto"
7
+ )