Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
inference: false
|
7 |
+
tags:
|
8 |
+
- transformers
|
9 |
+
- gguf
|
10 |
+
- imatrix
|
11 |
+
- Percival_01-7b-slerp
|
12 |
+
---
|
13 |
+
Quantizations of https://huggingface.co/AurelPx/Percival_01-7b-slerp
|
14 |
+
|
15 |
+
|
16 |
+
# From original readme
|
17 |
+
|
18 |
+
## 💻 Usage
|
19 |
+
|
20 |
+
```python
|
21 |
+
!pip install -qU transformers accelerate
|
22 |
+
|
23 |
+
from transformers import AutoTokenizer
|
24 |
+
import transformers
|
25 |
+
import torch
|
26 |
+
|
27 |
+
model = "AurelPx/Percival_01-7b-slerp"
|
28 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
29 |
+
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
31 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
32 |
+
pipeline = transformers.pipeline(
|
33 |
+
"text-generation",
|
34 |
+
model=model,
|
35 |
+
torch_dtype=torch.float16,
|
36 |
+
device_map="auto",
|
37 |
+
)
|
38 |
+
|
39 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
40 |
+
print(outputs[0]["generated_text"])
|
41 |
+
```
|