Update README.md
Browse files
README.md
CHANGED
@@ -54,6 +54,24 @@ decoded_output = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
54 |
print(decoded_output)
|
55 |
```
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
This model is designed to:
|
59 |
|
|
|
54 |
print(decoded_output)
|
55 |
```
|
56 |
|
57 |
+
LOADING THE MODEL DIRCTLY:
|
58 |
+
|
59 |
+
```python
|
60 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
61 |
+
import torch
|
62 |
+
|
63 |
+
# Use the merged model name from your Hugging Face repository
|
64 |
+
model_name = "vishal042002/Llama3.2-3b-Instruct-ClinicalSurgery"
|
65 |
+
model = AutoModelForCausalLM.from_pretrained(
|
66 |
+
model_name,
|
67 |
+
torch_dtype=torch.float16,
|
68 |
+
device_map="auto"
|
69 |
+
)
|
70 |
+
|
71 |
+
# Load the tokenizer
|
72 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
73 |
+
```
|
74 |
+
|
75 |
|
76 |
This model is designed to:
|
77 |
|