Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,78 @@
|
|
1 |
---
|
2 |
-
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- de
|
4 |
---
|
5 |
+
# ***WIP***
|
6 |
+
(Please bear with me)
|
7 |
+
|
8 |
+
|
9 |
+
_Hermes + Leo + German AWQ = Germeo_
|
10 |
+
|
11 |
+
# Germeo-7B-AWQ
|
12 |
+
|
13 |
+
A German-English language model merged from [Hermeo-7B](https://https://huggingface.co/malteos/hermeo-7b).
|
14 |
+
|
15 |
+
### Model details
|
16 |
+
|
17 |
+
- **Merged from:** [leo-mistral-hessianai-7b-chat](https://huggingface.co/LeoLM/leo-mistral-hessianai-7b-chat) and [DPOpenHermes-7B-v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2)
|
18 |
+
- **Model type:** Causal decoder-only transformer language model
|
19 |
+
- **Languages:** German replies with English Understanding Capabilities
|
20 |
+
- **Calibration Data:** [LeoLM/OpenSchnabeltier](https://huggingface.co/datasets/LeoLM/OpenSchnabeltier)
|
21 |
+
|
22 |
+
### Quantization Procedure and Use Case:
|
23 |
+
|
24 |
+
The speciality of this model is that it solely replies in German, independently from the system message or prompt.
|
25 |
+
Within the AWQ-process I introduced OpenSchnabeltier as calibration data for the model to stress the importance of German Tokens.
|
26 |
+
|
27 |
+
|
28 |
+
### Usage
|
29 |
+
|
30 |
+
|
31 |
+
```python
|
32 |
+
# setup [autoawq](https://github.com/casper-hansen/AutoAWQ)
|
33 |
+
from awq import AutoAWQForCausalLM
|
34 |
+
from transformers import AutoTokenizer, TextStreamer
|
35 |
+
|
36 |
+
quant_path = "aari1995/germeo-7b-awq"
|
37 |
+
|
38 |
+
# Load model
|
39 |
+
model = AutoAWQForCausalLM.from_quantized(quant_path, fuse_layers=True)
|
40 |
+
tokenizer = AutoTokenizer.from_pretrained(quant_path, trust_remote_code=True)
|
41 |
+
```
|
42 |
+
|
43 |
+
### Inference:
|
44 |
+
```python
|
45 |
+
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
46 |
+
|
47 |
+
# Convert prompt to tokens
|
48 |
+
prompt_template = """\
|
49 |
+
<|system|>
|
50 |
+
You're a helpful assistant</s>
|
51 |
+
<|user|>
|
52 |
+
{prompt}</s>
|
53 |
+
<|assistant|>"""
|
54 |
+
|
55 |
+
prompt = "Schreibe eine Stellenanzeige für Data Scientist bei AXA!"
|
56 |
+
|
57 |
+
tokens = tokenizer(
|
58 |
+
prompt_template.format(prompt=prompt),
|
59 |
+
return_tensors='pt'
|
60 |
+
).input_ids.cuda()
|
61 |
+
|
62 |
+
# Generate output
|
63 |
+
generation_output = model.generate(
|
64 |
+
tokens,
|
65 |
+
streamer=streamer,
|
66 |
+
max_new_tokens=1012
|
67 |
+
)
|
68 |
+
# tokenizer.decode(generation_output.flatten())
|
69 |
+
```
|
70 |
+
|
71 |
+
### Acknowledgements and Special Thanks
|
72 |
+
|
73 |
+
- Thank you [malteos](https://https://huggingface.co/malteos/) for hermeo, without this it would not be possible! (and all your other contributions)
|
74 |
+
- Thanks to the authors of the base models: [Mistral](https://mistral.ai/), [LAION](https://laion.ai/), [HessianAI](https://hessian.ai/), [Open Access AI Collective](https://huggingface.co/openaccess-ai-collective), [@teknium](https://huggingface.co/teknium), [@bjoernp](https://huggingface.co/bjoernp)
|
75 |
+
- Also [@bjoernp](https://huggingface.co/bjoernp) thank you for your contribution and LeoLM for OpenSchnabeltier.
|
76 |
+
|
77 |
+
## Evaluation and Benchmarks
|
78 |
+
TBA
|