Update README.md
Browse files
README.md
CHANGED
|
@@ -275,7 +275,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TorchAoConfig
|
|
| 275 |
|
| 276 |
# use "microsoft/Phi-4-mini-instruct" or "pytorch/Phi-4-mini-instruct-AWQ-INT4"
|
| 277 |
model_id = "pytorch/Phi-4-mini-instruct-AWQ-INT4"
|
| 278 |
-
quantized_model = AutoModelForCausalLM.from_pretrained(model_id, device_map="
|
| 279 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 280 |
|
| 281 |
torch.cuda.reset_peak_memory_stats()
|
|
|
|
| 275 |
|
| 276 |
# use "microsoft/Phi-4-mini-instruct" or "pytorch/Phi-4-mini-instruct-AWQ-INT4"
|
| 277 |
model_id = "pytorch/Phi-4-mini-instruct-AWQ-INT4"
|
| 278 |
+
quantized_model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda:0", torch_dtype=torch.bfloat16)
|
| 279 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 280 |
|
| 281 |
torch.cuda.reset_peak_memory_stats()
|