Instructions to use kuotient/Seagull-13b-translation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kuotient/Seagull-13b-translation with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="kuotient/Seagull-13b-translation")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kuotient/Seagull-13b-translation") model = AutoModelForCausalLM.from_pretrained("kuotient/Seagull-13b-translation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Seagull-13b-translation π
Seagull-13b-translation is yet another translator model, but carefully considered the following issues from existing translation models.
- Exact match of
newlineorspace - Not using dataset with first letter removed
- Code
- Markdown format
- LaTeX format
- etc
μ΄λ° μ΄μλ€μ μΆ©λΆν 체ν¬νκ³ νμ΅μ μ§ννμμ§λ§, λͺ¨λΈμ μ¬μ©ν λλ μ΄λ° λΆλΆμ λν κ²°κ³Όλ₯Ό λ©΄λ°νκ² μ΄ν΄λ³΄λ κ²μ μΆμ²ν©λλ€(μ½λκ° ν¬ν¨λ ν μ€νΈ λ±).
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. For a coffee chat or if you have any questions, please do not hesitate to contact me as well! - [email protected]
This model was created as a personal experiment, unrelated to the organization I work for.
License
From original model author:
- Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License, under LLAMA 2 COMMUNITY LICENSE AGREEMENT
- Full License available at: https://huggingface.co/beomi/llama-2-koen-13b/blob/main/LICENSE
Model Details
Developed by
Jisoo Kim(kuotient)
Base Model
Datasets
- sharegpt_deepl_ko_translation
- KOR-OpenOrca-Platypus-v3
- AIHUB
- κΈ°μ κ³Όν λΆμΌ ν-μ λ²μ λ³λ ¬ λ§λμΉ λ°μ΄ν°
- μΌμμν λ° κ΅¬μ΄μ²΄ ν-μ λ²μ λ³λ ¬ λ§λμΉ λ°μ΄ν°
Usage
Format
It follows only ChatML format.
<|im_start|>system
μ£Όμ΄μ§ λ¬Έμ₯μ νκ΅μ΄λ‘ λ²μνμΈμ.<|im_end|>
<|im_start|>user
{instruction}<|im_end|>
<|im_start|>assistant
# Don't miss newline here
<|im_start|>system
μ£Όμ΄μ§ λ¬Έμ₯μ μμ΄λ‘ λ²μνμΈμ.<|im_end|>
<|im_start|>user
{instruction}<|im_end|>
<|im_start|>assistant
# Don't miss newline here
Output example
μλ¬Έ:
A particle's wave function, $\psi(x)$, is given by $$\psi(x)=\begin{cases} 3x & \text{if } -1 \leq x \leq 0 \ 3(1-x) & \text{if } 0 < x \leq 1 \ 0 & \text{otherwise} \end{cases}$$ Compute the Fourier transform, $\tilde{\psi}(k)$, of the wave function $\psi(x)$ and show that it satisfies the Fourier inversion theorem, i.e., $\psi(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \tilde{\psi}(k) e^{ikx} \mathrm{d}k$.
Seagull-13b-translation:
μ μμ νλ ν¨μ $\psi(x)$λ λ€μκ³Ό κ°μ΄ μ£Όμ΄μ§λλ€. $$\psi(x)=\begin{cases} 3x & \text{if } -1 \leq x \leq 0 \ 3(1-x) & \text{if } 0 < x \leq 1 \ 0 & \text{otherwise} \end{cases}$$ νλ ν¨μ $\psi(x)$μ νΈλ¦¬μ λ³ν $\tilde{\psi}(k)$λ₯Ό κ³μ°νκ³ νΈλ¦¬μ λ°μ μ 리, μ¦ $\psi(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \tilde{\psi}(k) e^{ikx} \mathrm{d}k$λ₯Ό λ§μ‘±ν©λλ€.
DeepL:
μ μμ νλ ν¨μ $\psi(x)$λ $$\psi(x)=\begin{cases}λ‘ μ£Όμ΄μ§λλ€. 3x & \text{if } -1 \leq x \leq 0 \ 3(1-x) & \text{if } 0 < x \leq 1 \ 0 & \text{κΈ°ν} \end{cases}$$ νλ ν¨μ $\psi(x)$μ νΈλ¦¬μ λ³νμΈ $\tilde{\psi}(k)$λ₯Ό κ³μ°νκ³ νΈλ¦¬μ λ°μ μ 리, μ¦ $\psi(x) = \frac{1}{\sqrt{2\pi}}λ₯Ό λ§μ‘±ν¨μ μ¦λͺ ν©λλ€. \int_{-\infty}^{\infty} \λ¬Όκ²°ν{\psi}(k) e^{ikx} \mathrm{d}k$.
...and much more awesome cases with SQL query, code and markdown!
How to
I highly recommend to inference model with vllm. I will write a guide for quick and easy inference if requested. Since, chat_template already contains insturction format above. You can use the code below.
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto
model = AutoModelForCausalLM.from_pretrained("kuotient/Seagull-13B-translation")
tokenizer = AutoTokenizer.from_pretrained("kuotient/Seagull-13B-translation")
messages = [
{"role": "system", "content", "μ£Όμ΄μ§ λ¬Έμ₯μ νκ΅μ΄λ‘ λ²μνμΈμ."}
{"role": "user", "content": "Here are five examples of nutritious foods to serve your kids."},
]
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
model_inputs = encodeds.to(device)
model.to(device)
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
decoded = tokenizer.batch_decode(generated_ids)
print(decoded[0])
- Downloads last month
- 17