Update README.md
Browse files
README.md
CHANGED
@@ -33,8 +33,11 @@ peft_model_id = "crumb/GeoV-Instruct-LoRA"
|
|
33 |
model = PeftModel.from_pretrained(model, peft_model_id)
|
34 |
|
35 |
# Inference
|
|
|
|
|
36 |
|
37 |
-
|
|
|
38 |
with torch.cuda.amp.autocast():
|
39 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|
40 |
print(tokenizer.decode(output_tokens[0], skip_special_tokens=True))
|
|
|
33 |
model = PeftModel.from_pretrained(model, peft_model_id)
|
34 |
|
35 |
# Inference
|
36 |
+
prompt = '''
|
37 |
+
Describe the structure of an atom.
|
38 |
|
39 |
+
'''
|
40 |
+
batch = tokenizer(prompt, return_tensors='pt')
|
41 |
with torch.cuda.amp.autocast():
|
42 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|
43 |
print(tokenizer.decode(output_tokens[0], skip_special_tokens=True))
|