Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,73 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- ko
|
| 5 |
+
base_model:
|
| 6 |
+
- Qwen/Qwen2.5-14B-Instruct
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Announcing OLAFv2: The Next Step in Korean Language Understanding π
|
| 10 |
+
|
| 11 |
+
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.
|
| 12 |
+
|
| 13 |
+
## Key Features of OLAFv2 π
|
| 14 |
+
|
| 15 |
+
### **Two Model Sizes for Flexibility**
|
| 16 |
+
OLAFv2 is available in two parameter sizes:
|
| 17 |
+
- **14B (Billion) Parameters**: For maximum performance. ποΈββοΈ
|
| 18 |
+
- **1.5B (Billion) Parameters**: For lightweight applications and hardware-constrained environments. πͺΆ
|
| 19 |
+
|
| 20 |
+
### **Reasoning Mode for Complex Tasks** π€
|
| 21 |
+
One of OLAFv2's standout features is its **Reasoning Mode**, specifically designed for:
|
| 22 |
+
- Complex mathematical problem-solving. βοΈβ
|
| 23 |
+
- STEM (Science, Technology, Engineering, Mathematics) applications. π¬π
|
| 24 |
+
- Tasks requiring detailed step-by-step reasoning. π§
|
| 25 |
+
|
| 26 |
+
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. π
|
| 27 |
+
|
| 28 |
+
### **Long Context Support** π
|
| 29 |
+
With support for up to **32K tokens**, OLAFv2 is perfect for:
|
| 30 |
+
- Retrieval-Augmented Generation (RAG). π οΈ
|
| 31 |
+
- Tasks requiring long-context understanding and reasoning. π§΅
|
| 32 |
+
|
| 33 |
+
## Getting Started π
|
| 34 |
+
OLAFv2 is now available on Hugging Face! You can start using it by accessing our repository:
|
| 35 |
+
|
| 36 |
+
```python
|
| 37 |
+
# pip install transformers
|
| 38 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 39 |
+
|
| 40 |
+
model_name = "OLAResearch/OLAF2-14B"
|
| 41 |
+
|
| 42 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 43 |
+
model_name,
|
| 44 |
+
torch_dtype="auto",
|
| 45 |
+
device_map="auto"
|
| 46 |
+
)
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 48 |
+
|
| 49 |
+
prompt = "introduce yourself!"
|
| 50 |
+
messages = [
|
| 51 |
+
{"role": "system", "content": "You're name is OLAF. A large language model made by OneLineAI, specializing in Korean culture and finance."},
|
| 52 |
+
# for reasoning mode
|
| 53 |
+
#{"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."},
|
| 54 |
+
{"role": "user", "content": prompt}
|
| 55 |
+
]
|
| 56 |
+
text = tokenizer.apply_chat_template(
|
| 57 |
+
messages,
|
| 58 |
+
tokenize=False,
|
| 59 |
+
add_generation_prompt=True
|
| 60 |
+
)
|
| 61 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 62 |
+
|
| 63 |
+
generated_ids = model.generate(
|
| 64 |
+
**model_inputs,
|
| 65 |
+
max_new_tokens=512
|
| 66 |
+
)
|
| 67 |
+
generated_ids = [
|
| 68 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 69 |
+
]
|
| 70 |
+
|
| 71 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 72 |
+
```
|
| 73 |
+
|