Qwen3-8B-Korean-Highschool-English-Exam
๐ ๊ฐ์
Qwen3-8B๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ ํ๊ตญ ๊ณ ๋ฑํ๊ต ์์ด ๋ด์ ๋ฌธ์ ์์ฑ ๋ชจ๋ธ์ ๋๋ค. ์์ด ์ง๋ฌธ์ ์ ๋ ฅ๋ฐ์ ์๋ฅ ๋ฐ ๋ด์ ์์ค์ ๋ค์ํ ๋ฌธ์ ์ ํ์ ์๋์ผ๋ก ์์ฑํฉ๋๋ค.
๐ฏ ์ฃผ์ ํน์ง
- ๊ณ ๋ฑํ๊ต 2ํ๋ ์์ค ์์ด ๋ด์ ๋ฌธ์ ์์ฑ์ ํนํ
- 6๊ฐ์ง ํต์ฌ ๋ฌธ์ ์ ํ ์ง์
- 500๊ฐ ์ด์์ ๊ณ ํ์ง ๋ฐ์ดํฐ์ ์ผ๋ก Fine-tuning
- LoRA ๊ธฐ๋ฐ ๊ฒฝ๋ํ ํ์ธํ๋์ผ๋ก ํ์ต
- ์ค์ ์๋ฅ/๋ด์ ์ถ์ ํจํด ๋ฐ์
๐ ์ง์ ๋ฌธ์ ์ ํ
๋ฌธ์ ์ ํ | ์ค๋ช |
---|---|
์ ๋ชฉ ์ถ๋ก | ์ง๋ฌธ์ ๊ฐ์ฅ ์ ์ ํ ์ ๋ชฉ์ ์ฐพ๋ ๋ฌธ์ |
์ฃผ์ ์ถ๋ก | ์ง๋ฌธ์ ํต์ฌ ์ฃผ์ ๋ฅผ ํ์ ํ๋ ๋ฌธ์ |
๋ด์ฉ ๋ถ์ผ์น | ์ง๋ฌธ ๋ด์ฉ๊ณผ ์ผ์นํ์ง ์๋ ์ ํ์ง๋ฅผ ์ฐพ๋ ๋ฌธ์ |
๋น์นธ ์ถ๋ก | ๋ฌธ๋งฅ์ ๋น์นธ์ ๋ค์ด๊ฐ ์ ์ ํ ํํ์ ์ฐพ๋ ๋ฌธ์ |
์ด๋ฒ ์ค๋ฅ | ๋ฌธ๋ฒ์ ์ผ๋ก ์๋ชป๋ ๋ถ๋ถ์ ์ฐพ๋ ๋ฌธ์ |
๐ ๋น ๋ฅธ ์์
์ค์น
pip install transformers peft torch
๊ธฐ๋ณธ ์ฌ์ฉ๋ฒ
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer
import torch
# ๋ชจ๋ธ ๋ก๋
model = AutoPeftModelForCausalLM.from_pretrained(
"huggingface-KREW/Qwen3-8B-Korean-Highschool-English-Exam",
device_map="auto",
torch_dtype=torch.bfloat16
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B")
# ์์ด ์ง๋ฌธ ์์
passage = """
If the brain has already stored someone's face and name, why do we still end up
remembering one and not the other? This is because the brain has a two-tier memory
system at work when it comes to retrieving memories, giving rise to a common yet
infuriating sensation: recognising someone but not being able to remember how or why,
or what their name is.
"""
# ๋ฌธ์ ์์ฑ ํจ์
def generate_question(passage, question_type):
messages = [
{
"role": "user",
"content": f"๋ค์ ์์ด ์ง๋ฌธ์ {question_type} ๋ฌธ์ ๋ก ๋ง๋ค์ด์ฃผ์ธ์.\n\n์ง๋ฌธ:\n{passage}\n\n"
}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
inputs["input_ids"].to("cuda"),
max_new_tokens=1024,
temperature=0.7,
do_sample=True
)
return tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
# ์ ๋ชฉ ์ถ๋ก ๋ฌธ์ ์์ฑ
result = generate_question(passage, "์ ๋ชฉ ์ถ๋ก ")
print(result)
๋ฐฐ์น ๋ฌธ์ ์์ฑ
# ๋ชจ๋ ๋ฌธ์ ์ ํ์ ๋ํด ๋ฌธ์ ์์ฑ
question_types = ["์ ๋ชฉ ์ถ๋ก ", "์ฃผ์ ์ถ๋ก ", "๋ด์ฉ ๋ถ์ผ์น", "๋น์นธ ์ถ๋ก ", "์ด๋ฒ ์ค๋ฅ", "์์ง ์ถ๋ก "]
for q_type in question_types:
print(f"\n{'='*50}")
print(f"{q_type} ๋ฌธ์ ")
print('='*50)
result = generate_question(passage, q_type)
print(result)
๐ ๋ฐ์ดํฐ์ ๊ตฌ์ฑ
RAW ๋ฐ์ดํฐ ํ์
{
"passage": "The Great Fire of London occurred in September 1666...",
"passage_length": 320,
"questions": [
{
"year": 2024,
"type": "main_idea",
"grade_level": "HighSchool 2nd Grade",
"difficulty": "easy",
"question": "What is the main idea of the passage?",
"options": [
"London has always been...",
"The Great Fire caused...",
"St. Paul's Cathedral was...",
"Wooden buildings were..."
],
"answer": "The Great Fire caused....",
"cognitive_skill": "comprehension"
}
]
}
Fine-tuning ๋ฐ์ดํฐ ํ์
{
"instruction": "Generate a multiple-choice question for grade: HighSchool 2nd Grade, level: Medium, question type: Main Idea.",
"input": "Passage: 'The Great Fire of London occurred in September 1666...",
"output": "Question: 'What is the main idea of the passage?'\nA) The Great Fire ...\nB) The fire started ...\nC) The fire spread ...\nD) The Great Fire of London had ...\nAnswer: C"
}
๐ง ๋ชจ๋ธ ์์ธ ์ ๋ณด
๊ธฐ๋ณธ ๋ชจ๋ธ
- Base Model: Qwen3-8B
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- Training Data: 500+ ๊ณ ๋ฑํ๊ต ์์ด ๋ด์ ๋ฌธ์
- Language: Korean (Question) + English (Passage)
ํ์ต ์ค์
- Learning Rate: 1e-4
- Batch Size: 1
- LoRA Rank: 16
- LoRA Alpha: 64
- Training Epochs: 3
ํ๊ฐ ๋ฐฉ๋ฒ
- ์๋ ํ๊ฐ: ๋ฌธ๋ฒ, ๋จ์ด ๋์ด๋ ๋ฑ ํ ์คํธ ํ์ง ์๋ ํ๊ฐ
- ์ ๋ฌธ๊ฐ ํ๊ฐ: ๊ต์ก ์ ๋ฌธ๊ฐ์ ๋ฌธ์ ํ์ง ๋ฐ ์ ์ ์ฑ ํ๊ฐ
๐ ์ฑ๋ฅ ์งํ๋ ํ์ฌ ํ๊ฐ ์งํ ์ค์ ๋๋ค
๐ก ์ฌ์ฉ ์์
1. ์ ๋ชฉ ์ถ๋ก ๋ฌธ์ ์์ฑ
passage = "Climate change is one of the most pressing issues..."
question = generate_question(passage, "์ ๋ชฉ ์ถ๋ก ")
์ถ๋ ฅ ์์:
๋ค์ ๊ธ์ ์ ๋ชฉ์ผ๋ก ๊ฐ์ฅ ์ ์ ํ ๊ฒ์?
โ The History of Climate Research
โก Climate Change: An Urgent Global Challenge
โข Weather Patterns Around the World
โฃ Scientific Methods in Environmental Studies
โค The Future of Renewable Energy
์ ๋ต: โก
2. ๋น์นธ ์ถ๋ก ๋ฌธ์ ์์ฑ
question = generate_question(passage, "๋น์นธ ์ถ๋ก ")
์ถ๋ ฅ ์์:
๋ค์ ๊ธ์ ๋น ์นธ์ ๋ค์ด๊ฐ ๋ง๋ก ๊ฐ์ฅ ์ ์ ํ ๊ฒ์?
Climate change is _________________ that requires immediate action.
โ a minor environmental concern
โก an inevitable natural process
โข one of humanity's greatest challenges
โฃ primarily an economic issue
โค a problem for future generations
์ ๋ต: โข
Model Card
์ฉ๋ ๋ฐ ์ ํ์ฌํญ
์ ํฉํ ์ฉ๋:
- ๊ณ ๋ฑํ๊ต ์์ด ๊ต์ก์ฉ ๋ฌธ์ ์์ฑ
- ๊ต์ก ์ฝํ ์ธ ์๋ํ
์ ํ์ฌํญ:
- ๊ณ ๋ฑํ๊ต ์์ค์ ๋ฒ์ด๋ ์ ๋ฌธ์ ๋ด์ฉ์๋ ๋ถ์ ํฉ
- ๋ฌธํ์ ๋งฅ๋ฝ์ด ๊ฐํ ์ง๋ฌธ์ ๊ฒฝ์ฐ ์ ํ๋ ์ ํ ๊ฐ๋ฅ
- ์์ฑ๋ ๋ฌธ์ ๋ ์ ๋ฌธ๊ฐ ๊ฒํ ๊ถ์ฅ
ํธํฅ์ฑ ๋ฐ ์ํ์ฑ
- ํ์ต ๋ฐ์ดํฐ์ ํธํฅ์ด ๋ฐ์๋ ์ ์์
- ์์ฑ๋ ๋ด์ฉ์ ์ฌ์ค์ฑ ๊ฒ์ฆ ํ์
- ๊ต์ก ๋ชฉ์ ์ธ ์ฌ์ฉ ์ ์ฃผ์ ์๋ง
๐ ์ธ์ฉ
@misc{qwen3-korean-english-exam,
title={Qwen3-8B-Korean-Highschool-English-Exam},
author={Hugging Face KREW},
year={2024},
publisher={suil0109},
url={https://huggingface.co/huggingface-KREW/Qwen3-8B-Korean-Highschool-English-Exam}
}
๐ ๋ผ์ด์ ์ค
์ด ๋ชจ๋ธ์ Apache 2.0 ๋ผ์ด์ ์ค ํ์ ๋ฐฐํฌ๋ฉ๋๋ค.
๐ค ๊ธฐ์ฌ ๋ฐ ์ง์
- Contact: [[email protected]]
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support