Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-sa-4.0
|
3 |
+
datasets:
|
4 |
+
- squarelike/sharegpt_deepl_ko_translation
|
5 |
+
language:
|
6 |
+
- ko
|
7 |
+
pipeline_tag: translation
|
8 |
+
tags:
|
9 |
+
- translate
|
10 |
+
---
|
11 |
+
# **Seagull-13b-translation-AWQ ๐**
|
12 |
+
![Seagull-typewriter](./Seagull-typewriter-pixelated.png)
|
13 |
+
## This is quantized version of original model: Seagull-13b-translation.
|
14 |
+
**Seagull-13b-translation** is yet another translator model, but carefully considered the following issues from existing translation models.
|
15 |
+
- `newline` or `space` not matching the original text
|
16 |
+
- Using translated dataset with first letter removed for training
|
17 |
+
- Codes
|
18 |
+
- Markdown format
|
19 |
+
- LaTeX format
|
20 |
+
- etc
|
21 |
+
|
22 |
+
์ด๋ฐ ์ด์๋ค์ ์ถฉ๋ถํ ์ฒดํฌํ๊ณ ํ์ต์ ์งํํ์์ง๋ง, ๋ชจ๋ธ์ ์ฌ์ฉํ ๋๋ ์ด๋ฐ ๋ถ๋ถ์ ๋ํ ๊ฒฐ๊ณผ๋ฅผ ๋ฉด๋ฐํ๊ฒ ์ดํด๋ณด๋ ๊ฒ์ ์ถ์ฒํฉ๋๋ค(์ฝ๋๊ฐ ํฌํจ๋ ํ
์คํธ ๋ฑ).
|
23 |
+
|
24 |
+
> If you're interested in building large-scale language models to solve a wide variety of problems in a wide variety of domains, you should consider joining [Allganize](https://allganize.career.greetinghr.com/o/65146).
|
25 |
+
For a coffee chat or if you have any questions, please do not hesitate to contact me as well! - kuotient.dev@gmail.com
|
26 |
+
|
27 |
+
This model was created as a personal experiment, unrelated to the organization I work for.
|
28 |
+
|
29 |
+
# **License**
|
30 |
+
## From original model author:
|
31 |
+
- Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License, under LLAMA 2 COMMUNITY LICENSE AGREEMENT
|
32 |
+
- Full License available at: https://huggingface.co/beomi/llama-2-koen-13b/blob/main/LICENSE
|
33 |
+
|
34 |
+
# **Model Details**
|
35 |
+
#### **Developed by**
|
36 |
+
Jisoo Kim(kuotient)
|
37 |
+
#### **Base Model**
|
38 |
+
[beomi/llama-2-koen-13b](https://huggingface.co/beomi/llama-2-koen-13b)
|
39 |
+
#### **Datasets**
|
40 |
+
- [sharegpt_deepl_ko_translation](https://huggingface.co/datasets/squarelike/sharegpt_deepl_ko_translation)
|
41 |
+
- AIHUB
|
42 |
+
- ๊ธฐ์ ๊ณผํ ๋ถ์ผ ํ-์ ๋ฒ์ญ ๋ณ๋ ฌ ๋ง๋ญ์น ๋ฐ์ดํฐ
|
43 |
+
- ์ผ์์ํ ๋ฐ ๊ตฌ์ด์ฒด ํ-์ ๋ฒ์ญ ๋ณ๋ ฌ ๋ง๋ญ์น ๋ฐ์ดํฐ
|
44 |
+
|
45 |
+
## Usage
|
46 |
+
#### Format
|
47 |
+
It follows only **ChatML** format.
|
48 |
+
|
49 |
+
```python
|
50 |
+
<|im_start|>system
|
51 |
+
์ฃผ์ด์ง ๋ฌธ์ฅ์ ํ๊ตญ์ด๋ก ๋ฒ์ญํ์ธ์.<|im_end|>
|
52 |
+
<|im_start|>user
|
53 |
+
{instruction}<|im_end|>
|
54 |
+
<|im_start|>assistant
|
55 |
+
# Don't miss newline here
|
56 |
+
```
|
57 |
+
```python
|
58 |
+
<|im_start|>system
|
59 |
+
์ฃผ์ด์ง ๋ฌธ์ฅ์ ์์ด๋ก ๋ฒ์ญํ์ธ์.<|im_end|>
|
60 |
+
<|im_start|>user
|
61 |
+
{instruction}<|im_end|>
|
62 |
+
<|im_start|>assistant
|
63 |
+
# Don't miss newline here
|
64 |
+
```
|
65 |
+
|
66 |
+
#### Example
|
67 |
+
**I highly recommend to use vllm. I will write a guide for quick and easy inference if requested.**
|
68 |
+
|
69 |
+
Since, chat_template already contains insturction format above.
|
70 |
+
You can use the code below.
|
71 |
+
```python
|
72 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
73 |
+
device = "cuda" # the device to load the model onto
|
74 |
+
model = AutoModelForCausalLM.from_pretrained("kuotient/Seagull-13B-translation")
|
75 |
+
tokenizer = AutoTokenizer.from_pretrained("kuotient/Seagull-13B-translation")
|
76 |
+
messages = [
|
77 |
+
{"role": "user", "content": "๋ฐ๋๋๋ ์๋ ํ์์์ด์ผ?"},
|
78 |
+
]
|
79 |
+
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
|
80 |
+
|
81 |
+
model_inputs = encodeds.to(device)
|
82 |
+
model.to(device)
|
83 |
+
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
84 |
+
decoded = tokenizer.batch_decode(generated_ids)
|
85 |
+
print(decoded[0])
|
86 |
+
```
|