Improve language tag
#2
by
lbourdois
- opened
README.md
CHANGED
|
@@ -1,99 +1,111 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
### **
|
| 36 |
-
|
| 37 |
-
-
|
| 38 |
-
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- zho
|
| 5 |
+
- eng
|
| 6 |
+
- fra
|
| 7 |
+
- spa
|
| 8 |
+
- por
|
| 9 |
+
- deu
|
| 10 |
+
- ita
|
| 11 |
+
- rus
|
| 12 |
+
- jpn
|
| 13 |
+
- kor
|
| 14 |
+
- vie
|
| 15 |
+
- tha
|
| 16 |
+
- ara
|
| 17 |
+
base_model:
|
| 18 |
+
- Qwen/Qwen2.5-14B-Instruct
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Announcing OLAFv2: The Next Step in Korean Language Understanding ๐
|
| 22 |
+
|
| 23 |
+
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.
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
|
| 28 |
+
## Key Features of OLAFv2 ๐
|
| 29 |
+
|
| 30 |
+
### **Two Model Sizes for Flexibility**
|
| 31 |
+
OLAFv2 is available in two parameter sizes:
|
| 32 |
+
- **14B (Billion) Parameters**: For maximum performance. ๐๏ธโโ๏ธ
|
| 33 |
+
- **1.5B (Billion) Parameters**: For lightweight applications and hardware-constrained environments. ๐ชถ
|
| 34 |
+
|
| 35 |
+
### **Reasoning Mode for Complex Tasks** ๐ค
|
| 36 |
+
One of OLAFv2's standout features is its **Reasoning Mode**, specifically designed for:
|
| 37 |
+
- Complex mathematical problem-solving. โ๏ธโ
|
| 38 |
+
- STEM (Science, Technology, Engineering, Mathematics) applications. ๐ฌ๐
|
| 39 |
+
- Tasks requiring detailed step-by-step reasoning. ๐ง
|
| 40 |
+
|
| 41 |
+
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. ๐
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
### **Long Context Support** ๐
|
| 48 |
+
With support for up to **32K tokens**, OLAFv2 is perfect for:
|
| 49 |
+
- Retrieval-Augmented Generation (RAG). ๐ ๏ธ
|
| 50 |
+
- Tasks requiring long-context understanding and reasoning. ๐งต
|
| 51 |
+
|
| 52 |
+
## Benchmarks and Performance ๐
|
| 53 |
+
|
| 54 |
+
We share evaluation results across three benchmarks, KMMLU, HRM8K and LogicKor.
|
| 55 |
+
|
| 56 |
+
<div style="text-align: center;">
|
| 57 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/650c0029987b1ae4e51fa2d4/rCloMEgq16D8-UuCkM8Pa.png" width="700px" height="450px" title="polyglot_budget" alt="polyglot_budget"/>
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
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).
|
| 62 |
+
|
| 63 |
+
<!--   -->
|
| 64 |
+
|
| 65 |
+
<div style="display: flex; justify-content: space-between; align-items: center;">
|
| 66 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/650c0029987b1ae4e51fa2d4/Qa2-91s0nvwIsx0cjRM-W.png" alt="alt-text-1" title="title-1" style="width: 48%;"/>
|
| 67 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/650c0029987b1ae4e51fa2d4/8eATw4sMb-OrgqhRujR0z.png" alt="alt-text-2" title="title-2" style="width: 48%;"/>
|
| 68 |
+
</div>
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
## Getting Started ๐
|
| 72 |
+
OLAFv2 is now available on Hugging Face! You can start using it by accessing our repository:
|
| 73 |
+
|
| 74 |
+
```python
|
| 75 |
+
# pip install transformers
|
| 76 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 77 |
+
|
| 78 |
+
model_name = "OLAResearch/OLAF2-14B"
|
| 79 |
+
|
| 80 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 81 |
+
model_name,
|
| 82 |
+
torch_dtype="auto",
|
| 83 |
+
device_map="auto"
|
| 84 |
+
)
|
| 85 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 86 |
+
|
| 87 |
+
prompt = "introduce yourself!"
|
| 88 |
+
messages = [
|
| 89 |
+
{"role": "system", "content": "You're name is OLAF. A large language model made by OneLineAI, specializing in Korean culture and finance."},
|
| 90 |
+
# for reasoning mode
|
| 91 |
+
#{"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."},
|
| 92 |
+
{"role": "user", "content": prompt}
|
| 93 |
+
]
|
| 94 |
+
text = tokenizer.apply_chat_template(
|
| 95 |
+
messages,
|
| 96 |
+
tokenize=False,
|
| 97 |
+
add_generation_prompt=True
|
| 98 |
+
)
|
| 99 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 100 |
+
|
| 101 |
+
generated_ids = model.generate(
|
| 102 |
+
**model_inputs,
|
| 103 |
+
max_new_tokens=512
|
| 104 |
+
)
|
| 105 |
+
generated_ids = [
|
| 106 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 107 |
+
]
|
| 108 |
+
|
| 109 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 110 |
+
```
|
| 111 |
+
|