Qwen3-8B-Korean-Highschool-English-Exam

License Model Fine-tuned

๐Ÿ“š ๊ฐœ์š”

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 ๋ผ์ด์„ ์Šค ํ•˜์— ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค.

๐Ÿค ๊ธฐ์—ฌ ๋ฐ ์ง€์›


Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for huggingface-KREW/Qwen3-8B-Korean-Highschool-English-Exam

Base model

Qwen/Qwen3-8B-Base
Finetuned
Qwen/Qwen3-8B
Finetuned
(99)
this model