Update README.md
Browse files
README.md
CHANGED
@@ -1,4 +1,66 @@
|
|
|
|
|
|
1 |
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
Format: Llama-3-Instruct
|
|
|
1 |
+
---
|
2 |
+
license: llama3
|
3 |
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
base_model: meta-llama/Meta-Llama-3-8B
|
7 |
+
---
|
8 |
+
|
9 |
+
## Overview
|
10 |
+
|
11 |
+
**nephra v1** is primarily a model built for roleplaying sessions, trained on proprietary roleplay and instruction-style datasets.
|
12 |
+
|
13 |
+
|
14 |
+
```python
|
15 |
+
import transformers
|
16 |
+
import torch
|
17 |
+
|
18 |
+
model_id = "yodayo-ai/Nephra_V1.0"
|
19 |
+
|
20 |
+
pipeline = transformers.pipeline(
|
21 |
+
"text-generation",
|
22 |
+
model=model_id,
|
23 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
24 |
+
device_map="auto",
|
25 |
+
)
|
26 |
+
|
27 |
+
messages = [
|
28 |
+
{"role": "system", "content": "You are to play the role of a cheerful assistant."},
|
29 |
+
{"role": "user", "content": "Hi there, how's your day?"},
|
30 |
+
]
|
31 |
+
|
32 |
+
prompt = pipeline.tokenizer.apply_chat_template(
|
33 |
+
messages,
|
34 |
+
tokenize=False,
|
35 |
+
add_generation_prompt=True
|
36 |
+
)
|
37 |
+
|
38 |
+
outputs = pipeline(
|
39 |
+
prompt,
|
40 |
+
max_new_tokens=512,
|
41 |
+
eos_token_id=[
|
42 |
+
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>"),
|
43 |
+
pipeline.tokenizer.eos_token_id,
|
44 |
+
],
|
45 |
+
do_sample=True,
|
46 |
+
temperature=1.12,
|
47 |
+
min_p=0.075,
|
48 |
+
)
|
49 |
+
print(outputs[0]["generated_text"][len(prompt):])
|
50 |
+
```
|
51 |
+
|
52 |
+
### Recommended Settings
|
53 |
+
|
54 |
+
To guide the model towards generating high quality responses, here are the ideal settings:
|
55 |
+
|
56 |
+
```
|
57 |
+
Prompt Format: Same Prompt Format as Llama-3-Instruct
|
58 |
+
Temperature - 1.12
|
59 |
+
min-p: 0.075
|
60 |
+
Repetition Penalty: 1.1
|
61 |
+
Custom Stopping Strings: "\n{{user}}", "<" , "```" , -> Has occasional broken generations.
|
62 |
+
```
|
63 |
+
|
64 |
+
|
65 |
+
nephra v1 falls under [META LLAMA 3 COMMUNITY LICENSE AGREEMENT](https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE).
|
66 |
|
|