Update README.md
Browse filesAdd trust_remote_code and specify bfloat16 precision for model loading
README.md
CHANGED
|
@@ -48,8 +48,8 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 48 |
|
| 49 |
# Load model and tokenizer
|
| 50 |
model_id = "openbmb/InfLLM-V2-Short-Dense-Base"
|
| 51 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 52 |
-
model = AutoModelForCausalLM.from_pretrained(model_id).to(device)
|
| 53 |
|
| 54 |
# Create a prompt
|
| 55 |
prompt = "The capital of France is"
|
|
|
|
| 48 |
|
| 49 |
# Load model and tokenizer
|
| 50 |
model_id = "openbmb/InfLLM-V2-Short-Dense-Base"
|
| 51 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
| 52 |
+
model = AutoModelForCausalLM.from_pretrained(model_id,trust_remote_code=True).to(device,dtype=torch.bfloat16)
|
| 53 |
|
| 54 |
# Create a prompt
|
| 55 |
prompt = "The capital of France is"
|