|
|
---
|
|
|
license: apache-2.0
|
|
|
language:
|
|
|
- zho
|
|
|
- eng
|
|
|
- fra
|
|
|
- spa
|
|
|
- por
|
|
|
- deu
|
|
|
- ita
|
|
|
- rus
|
|
|
- jpn
|
|
|
- kor
|
|
|
- vie
|
|
|
- tha
|
|
|
- ara
|
|
|
base_model:
|
|
|
- Qwen/Qwen2.5-14B-Instruct
|
|
|
---
|
|
|
|
|
|
# Announcing OLAFv2: The Next Step in Korean Language Understanding π
|
|
|
|
|
|
We are thrilled to announce the release of **OLAFv2**, our state-of-the-art Korean language model, now available on Hugging Face! π Designed to excel in complex reasoning, mathematical problem-solving, and general language understanding, OLAFv2 represents a significant leap forward in NLP capabilities for the Korean language.
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
## Key Features of OLAFv2 π
|
|
|
|
|
|
### **Two Model Sizes for Flexibility**
|
|
|
OLAFv2 is available in two parameter sizes:
|
|
|
- **14B (Billion) Parameters**: For maximum performance. ποΈββοΈ
|
|
|
- **1.5B (Billion) Parameters**: For lightweight applications and hardware-constrained environments. πͺΆ
|
|
|
|
|
|
### **Reasoning Mode for Complex Tasks** π€
|
|
|
One of OLAFv2's standout features is its **Reasoning Mode**, specifically designed for:
|
|
|
- Complex mathematical problem-solving. βοΈβ
|
|
|
- STEM (Science, Technology, Engineering, Mathematics) applications. π¬π
|
|
|
- Tasks requiring detailed step-by-step reasoning. π§
|
|
|
|
|
|
This mode can be effectively utilized for **Test-Time Scaling**, enabling the model to harness additional computational resources during inference. This approach enhances output detail and accuracy, achieving performance levels that surpass GPT-4o. π
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
### **Long Context Support** π
|
|
|
With support for up to **32K tokens**, OLAFv2 is perfect for:
|
|
|
- Retrieval-Augmented Generation (RAG). π οΈ
|
|
|
- Tasks requiring long-context understanding and reasoning. π§΅
|
|
|
|
|
|
## Benchmarks and Performance π
|
|
|
|
|
|
We share evaluation results across three benchmarks, KMMLU, HRM8K and LogicKor.
|
|
|
|
|
|
<div style="text-align: center;">
|
|
|
<img src="https://cdn-uploads.huggingface.co/production/uploads/650c0029987b1ae4e51fa2d4/rCloMEgq16D8-UuCkM8Pa.png" width="700px" height="450px" title="polyglot_budget" alt="polyglot_budget"/>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
We also share results with inference-time scaling. For more details have a look into our [blog](https://www.onelineai.com/blog/test-time-scaling).
|
|
|
|
|
|
<!--   -->
|
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
|
<img src="https://cdn-uploads.huggingface.co/production/uploads/650c0029987b1ae4e51fa2d4/Qa2-91s0nvwIsx0cjRM-W.png" alt="alt-text-1" title="title-1" style="width: 48%;"/>
|
|
|
<img src="https://cdn-uploads.huggingface.co/production/uploads/650c0029987b1ae4e51fa2d4/8eATw4sMb-OrgqhRujR0z.png" alt="alt-text-2" title="title-2" style="width: 48%;"/>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
## Getting Started π
|
|
|
OLAFv2 is now available on Hugging Face! You can start using it by accessing our repository:
|
|
|
|
|
|
```python
|
|
|
# pip install transformers
|
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
|
|
model_name = "OLAResearch/OLAF2-14B"
|
|
|
|
|
|
model = AutoModelForCausalLM.from_pretrained(
|
|
|
model_name,
|
|
|
torch_dtype="auto",
|
|
|
device_map="auto"
|
|
|
)
|
|
|
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
|
|
|
|
prompt = "introduce yourself!"
|
|
|
messages = [
|
|
|
{"role": "system", "content": "You're name is OLAF. A large language model made by OneLineAI, specializing in Korean culture and finance."},
|
|
|
# for reasoning mode
|
|
|
#{"role": "system", "content": "You're name is OLAF. A large language model made by OneLineAI, specializing in Korean culture and finance.Perform two-step reasoning. Return your answers in \\boxed{N} format."},
|
|
|
{"role": "user", "content": prompt}
|
|
|
]
|
|
|
text = tokenizer.apply_chat_template(
|
|
|
messages,
|
|
|
tokenize=False,
|
|
|
add_generation_prompt=True
|
|
|
)
|
|
|
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
|
|
|
|
|
generated_ids = model.generate(
|
|
|
**model_inputs,
|
|
|
max_new_tokens=512
|
|
|
)
|
|
|
generated_ids = [
|
|
|
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
|
|
]
|
|
|
|
|
|
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
|
|
```
|
|
|
|
|
|
|