Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 π**
|
12 |
+
![Seagull-typewriter](./Seagull-typewriter.png)
|
13 |
+
**Seagull-13b-translation** is yet another translator model, but carefully considered the following issues with existing translation models.
|
14 |
+
- `newline` or `space` not matching the original text
|
15 |
+
- Using translated dataset with first letter removed for training
|
16 |
+
- Codes
|
17 |
+
- Markdown format
|
18 |
+
- LaTeX format
|
19 |
+
- etc
|
20 |
+
|
21 |
+
μ΄λ° μ΄μλ€μ μΆ©λΆν 체ν¬νκ³ νμ΅μ μ§ννμμ§λ§, λͺ¨λΈμ μ¬μ©ν λλ μ΄λ° λΆλΆμ λν κ²°κ³Όλ₯Ό λ©΄λ°νκ² μ΄ν΄λ³΄λ κ²μ μΆμ²ν©λλ€(μ½λκ° ν¬ν¨λ ν
μ€νΈ λ±). λν κ°λ λ¬Έμ₯ λ°λ³΅ νμμ΄ μκΈΈ μ μμΌλ, νμ²λ¦¬ λ¨κ³μμ ν
μ€νΈνλ κ²μ μΆμ²ν©λλ€.
|
22 |
+
|
23 |
+
> 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).
|
24 |
+
For a coffee chat or if you have any questions, please do not hesitate to contact me as well! - [email protected]
|
25 |
+
|
26 |
+
This model was created as a personal experiment, unrelated to the organization I work for.
|
27 |
+
|
28 |
+
# **License**
|
29 |
+
## From original model author:
|
30 |
+
- Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License, under LLAMA 2 COMMUNITY LICENSE AGREEMENT
|
31 |
+
- Full License available at: https://huggingface.co/beomi/llama-2-koen-13b/blob/main/LICENSE
|
32 |
+
|
33 |
+
# **Model Details**
|
34 |
+
#### **Developed by**
|
35 |
+
Jisoo Kim(kuotient)
|
36 |
+
#### **Base Model**
|
37 |
+
[beomi/llama-2-koen-13b](https://huggingface.co/beomi/llama-2-koen-13b)
|
38 |
+
#### **Datasets**
|
39 |
+
- [sharegpt_deepl_ko_translation](https://huggingface.co/datasets/squarelike/sharegpt_deepl_ko_translation)
|
40 |
+
- AIHUB
|
41 |
+
- κΈ°μ κ³Όν λΆμΌ ν-μ λ²μ λ³λ ¬ λ§λμΉ λ°μ΄ν°
|
42 |
+
- μΌμμν λ° κ΅¬μ΄μ²΄ ν-μ λ²μ λ³λ ¬ λ§λμΉ λ°μ΄ν°
|
43 |
+
|
44 |
+
## Usage
|
45 |
+
#### Format
|
46 |
+
It follows only **ChatML** format.
|
47 |
+
|
48 |
+
```python
|
49 |
+
<|im_start|>system
|
50 |
+
μ£Όμ΄μ§ λ¬Έμ₯μ νκ΅μ΄λ‘ λ²μνμΈμ.<|im_end|>
|
51 |
+
<|im_start|>user
|
52 |
+
{instruction}<|im_end|>
|
53 |
+
<|im_start|>assistant
|
54 |
+
|
55 |
+
```
|
56 |
+
```python
|
57 |
+
<|im_start|>system
|
58 |
+
μ£Όμ΄μ§ λ¬Έμ₯μ μμ΄λ‘ λ²μνμΈμ.<|im_end|>
|
59 |
+
<|im_start|>user
|
60 |
+
{instruction}<|im_end|>
|
61 |
+
<|im_start|>assistant
|
62 |
+
|
63 |
+
```
|
64 |
+
|
65 |
+
#### Example code
|
66 |
+
Since, chat_template already contains insturction format above.
|
67 |
+
You can use the code below.
|
68 |
+
```python
|
69 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
70 |
+
device = "cuda" # the device to load the model onto
|
71 |
+
model = AutoModelForCausalLM.from_pretrained("kuotient/Seagull-13B-translation")
|
72 |
+
tokenizer = AutoTokenizer.from_pretrained("kuotient/Seagull-13B-translation")
|
73 |
+
messages = [
|
74 |
+
{"role": "user", "content": "λ°λλλ μλ νμμμ΄μΌ?"},
|
75 |
+
]
|
76 |
+
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
|
77 |
+
|
78 |
+
model_inputs = encodeds.to(device)
|
79 |
+
model.to(device)
|
80 |
+
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
81 |
+
decoded = tokenizer.batch_decode(generated_ids)
|
82 |
+
print(decoded[0])
|
83 |
+
```
|