johnrachwanpruna commited on
Commit
47c3ea4
1 Parent(s): 4ac84bb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -1
README.md CHANGED
@@ -64,8 +64,16 @@ You can run the smashed model with these steps:
64
 
65
  tokenizer = AutoTokenizer.from_pretrained("PrunaAI/Mixtral-8x22B-v0.1-bnb-4bit-smashed")
66
  model = AutoModelForCausalLM.from_pretrained(
67
- "PrunaAI/Mixtral-8x22B-v0.1-bnb-4bit-smashed",
 
 
68
  )
 
 
 
 
 
 
69
 
70
  ```
71
 
 
64
 
65
  tokenizer = AutoTokenizer.from_pretrained("PrunaAI/Mixtral-8x22B-v0.1-bnb-4bit-smashed")
66
  model = AutoModelForCausalLM.from_pretrained(
67
+ "PrunaAI/Mixtral-8x22B-v0.1-bnb-4bit-smashed",
68
+ device_map="sequential",
69
+ torch_dtype=torch.bfloat16,
70
  )
71
+
72
+ text = "Who is Einstein?"
73
+ inputs = tokenizer(text, return_tensors="pt")
74
+
75
+ outputs = model.generate(**inputs, max_new_tokens=20)
76
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
77
 
78
  ```
79