Instructions to use shujatoor/phi3nedtuned-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use shujatoor/phi3nedtuned-ner with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-3-mini-4k-instruct") model = PeftModel.from_pretrained(base_model, "shujatoor/phi3nedtuned-ner") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,8 +32,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
|
| 32 |
config = PeftConfig.from_pretrained("shujatoor/phi3nedtuned-ner")
|
| 33 |
model = AutoModelForCausalLM.from_pretrained(
|
| 34 |
"microsoft/Phi-3-mini-4k-instruct",
|
| 35 |
-
|
| 36 |
-
|
| 37 |
trust_remote_code=True,
|
| 38 |
)
|
| 39 |
model = PeftModel.from_pretrained(model, "shujatoor/phi3nedtuned-ner")
|
|
|
|
| 32 |
config = PeftConfig.from_pretrained("shujatoor/phi3nedtuned-ner")
|
| 33 |
model = AutoModelForCausalLM.from_pretrained(
|
| 34 |
"microsoft/Phi-3-mini-4k-instruct",
|
| 35 |
+
device_map="cuda",
|
| 36 |
+
torch_dtype="auto",
|
| 37 |
trust_remote_code=True,
|
| 38 |
)
|
| 39 |
model = PeftModel.from_pretrained(model, "shujatoor/phi3nedtuned-ner")
|