Update README.md
Browse files
README.md
CHANGED
@@ -105,8 +105,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
105 |
model_name,
|
106 |
trust_remote_code=True,
|
107 |
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.bfloat32,
|
108 |
-
device_map="auto"
|
109 |
-
use_cache=False
|
110 |
)
|
111 |
|
112 |
# Example agricultural query
|
@@ -131,7 +130,8 @@ with torch.no_grad():
|
|
131 |
top_k=50,
|
132 |
top_p=0.95,
|
133 |
temperature=0.6,
|
134 |
-
eos_token_id=tokenizer.eos_token_id
|
|
|
135 |
)
|
136 |
|
137 |
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
|
|
105 |
model_name,
|
106 |
trust_remote_code=True,
|
107 |
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.bfloat32,
|
108 |
+
device_map="auto"
|
|
|
109 |
)
|
110 |
|
111 |
# Example agricultural query
|
|
|
130 |
top_k=50,
|
131 |
top_p=0.95,
|
132 |
temperature=0.6,
|
133 |
+
eos_token_id=tokenizer.eos_token_id,
|
134 |
+
use_cache=False
|
135 |
)
|
136 |
|
137 |
print(tokenizer.decode(output[0], skip_special_tokens=True))
|