Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
license: apache-2.0
|
4 |
+
tags:
|
5 |
+
- llama-2
|
6 |
+
- fine-tuning
|
7 |
+
- text-generation
|
8 |
+
---
|
9 |
+
# Fine-Tuned Llama 2 Model
|
10 |
+
|
11 |
+
This model is a fine-tuned version of [Llama 2](https://huggingface.co/llama-2) on my custom dataset.
|
12 |
+
|
13 |
+
## Model Description
|
14 |
+
|
15 |
+
Provide a description of your model here.
|
16 |
+
|
17 |
+
## Usage
|
18 |
+
|
19 |
+
```python
|
20 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
21 |
+
|
22 |
+
model = AutoModelForCausalLM.from_pretrained("dlprt/fine-tuned-llama2-7b")
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained("dlprt/fine-tuned-llama2-7b")
|
24 |
+
|
25 |
+
inputs = tokenizer("Hello, world!", return_tensors="pt")
|
26 |
+
outputs = model.generate(**inputs)
|
27 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|