Update README.md
Browse files
README.md
CHANGED
|
@@ -48,6 +48,10 @@ The training format follows:
|
|
| 48 |
|
| 49 |
## 🔧 How to Use
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
### Load model normally:
|
| 52 |
|
| 53 |
``` python
|
|
@@ -72,11 +76,11 @@ inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
|
|
| 72 |
with torch.no_grad():
|
| 73 |
output = model.generate(
|
| 74 |
**inputs,
|
| 75 |
-
max_new_tokens=3000,
|
| 76 |
temperature=0.7,
|
| 77 |
top_p=0.9,
|
| 78 |
do_sample=True,
|
| 79 |
-
|
| 80 |
)
|
| 81 |
|
| 82 |
print(tokenizer.decode(output[0], skip_special_tokens=False))
|
|
|
|
| 48 |
|
| 49 |
## 🔧 How to Use
|
| 50 |
|
| 51 |
+
### Install dependencies (if not installed):
|
| 52 |
+
```bash
|
| 53 |
+
pip install transformers bitsandbytes
|
| 54 |
+
```
|
| 55 |
### Load model normally:
|
| 56 |
|
| 57 |
``` python
|
|
|
|
| 76 |
with torch.no_grad():
|
| 77 |
output = model.generate(
|
| 78 |
**inputs,
|
| 79 |
+
max_new_tokens=3000,
|
| 80 |
temperature=0.7,
|
| 81 |
top_p=0.9,
|
| 82 |
do_sample=True,
|
| 83 |
+
repetition_penalty=1.2,
|
| 84 |
)
|
| 85 |
|
| 86 |
print(tokenizer.decode(output[0], skip_special_tokens=False))
|