Commit
Β·
05f2b1e
1
Parent(s):
e9fb6f4
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,59 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- squarelike/sharegpt_deepl_ko_translation
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
- ko
|
8 |
+
pipeline_tag: translation
|
9 |
---
|
10 |
+
|
11 |
+
# Gugugo-koen-7B-V1.1
|
12 |
+
Detail repo: [https://github.com/jwj7140/Gugugo](https://github.com/jwj7140/Gugugo)
|
13 |
+
![Gugugo](./logo.png)
|
14 |
+
|
15 |
+
**Base Model**: [Llama-2-ko-7b](https://huggingface.co/beomi/llama-2-ko-7b)
|
16 |
+
|
17 |
+
**Training Dataset**: [sharegpt_deepl_ko_translation](https://huggingface.co/datasets/squarelike/sharegpt_deepl_ko_translation).
|
18 |
+
|
19 |
+
I trained with 1x A6000 GPUs for 90 hours.
|
20 |
+
|
21 |
+
## **Prompt Template**
|
22 |
+
**KO->EN**
|
23 |
+
```
|
24 |
+
### νκ΅μ΄: {sentence}</λ>
|
25 |
+
### μμ΄:
|
26 |
+
```
|
27 |
+
**EN->KO**
|
28 |
+
```
|
29 |
+
### μμ΄: {sentence}</λ>
|
30 |
+
### νκ΅μ΄:
|
31 |
+
```
|
32 |
+
|
33 |
+
## **Implementation Code**
|
34 |
+
```python
|
35 |
+
from vllm import LLM, SamplingParams
|
36 |
+
|
37 |
+
def make_prompt(data):
|
38 |
+
prompts = []
|
39 |
+
for line in data:
|
40 |
+
prompts.append(f"### μμ΄: {line}</λ>\n### νκ΅μ΄:")
|
41 |
+
return prompts
|
42 |
+
|
43 |
+
texts = [
|
44 |
+
"Hello world!",
|
45 |
+
"Nice to meet you!"
|
46 |
+
]
|
47 |
+
|
48 |
+
prompts = make_prompt(texts)
|
49 |
+
|
50 |
+
sampling_params = SamplingParams(temperature=0.01, stop=["</λ>"], max_tokens=700)
|
51 |
+
|
52 |
+
llm = LLM(model="squarelike/Gugugo-koen-7B-V1.1-AWQ", quantization="awq", dtype="half")
|
53 |
+
|
54 |
+
outputs = llm.generate(prompts, sampling_params)
|
55 |
+
|
56 |
+
# Print the outputs.
|
57 |
+
for output in outputs:
|
58 |
+
print(output.outputs[0].text)
|
59 |
+
```
|