Downloads · 30 days
7
18% of all-time downloads
SeongeonKim/Qwen2.5-0.5B-schoolmath_v2
Qwen2.5-0.5B-schoolmath_v2 is a machine learning model from SeongeonKim. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
작성자: Seongeon Kim 날짜: 2025-05-27 허브 링크: https://huggingface.co/SeongeonKim/Qwen2.5-0.5B-schoolmath\v2
Downloads · 30 days
7
18% of all-time downloads
All-time downloads
40
Public
Parameters
494M
1000 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors988 MB · 98%
From the Hugging Face model README
작성자: Seongeon Kim 날짜: 2025-05-27 허브 링크: https://huggingface.co/SeongeonKim/Qwen2.5-0.5B-schoolmath_v2
unsloth/Qwen2-0.5BLoRA 구성
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj학습 프레임워크
학습 데이터
GSM8K train split (7,473문제)
프롬프트 템플릿:
Please solve the following math problem according to these instructions:
1. Whenever you perform a calculation, display it in the form <<expression=result>>.
2. Alternate between a brief explanatory sentence and the corresponding calculation, step by step.
3. On the very last line, output only the final numeric answer in the format #### {{answer}}.
### Problem: {}
### Solution: {}
하이퍼파라미터
adamw_8bitlinear컴퓨트 환경
| 모델 | strict-match (5-shot) | flexible-extract (5-shot) |
|---|---|---|
| 파인튜닝 모델<br/>Qwen2.5-0.5B-schoolmath_v1 | 24.56 ± 1.19 % | 24.56 ± 1.19 % |
| 베이직 모델<br/>unsloth/Qwen2.5-0.5B | 34.34 ± 1.31 % | 35.18 ± 1.32 % |
해설
- 엄격 매칭(strict-match):
#### <답안>패턴으로 정확히 일치해야 성공으로 간주- 유연 추출(flexible-extract): 숫자만 추출해 매칭(쉼표·달러 기호 제외)
pip install lm-evaluation-harness[vllm] vllm transformers
lm_eval \
--model vllm \
--model_args pretrained=SeongeonKim/Qwen2.5-0.5B-schoolmath_v1 \
--tasks gsm8k \
--device cuda:0 \
--batch_size auto
from transformers import AutoTokenizer
from peft import PeftModel
import torch
# 토크나이저 및 LoRA 어댑터 로드
tokenizer = AutoTokenizer.from_pretrained("SeongeonKim/Qwen2.5-0.5B-schoolmath_v1")
base_model = torch.load("unsloth/Qwen2-0.5B") # 또는 FastLanguageModel 로더
model = PeftModel.from_pretrained(base_model, "SeongeonKim/Qwen2.5-0.5B-schoolmath_v1")
model.eval().to("cuda")
prompt = "Question: If you have 3 apples and buy 2 more, how many apples? Answer:"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=16)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
용도: 연구·교육용으로 GSM8K와 같은 다단계 수리 문제 실험
제한사항
라이선스: Apache 2.0
윤리적 고려사항
@misc{SeongeonKim2025QwenSchoolMath,
title = {Qwen2.5-0.5B-schoolmath\_v1: LoRA-tuned Qwen2.5-0.5B on GSM8K},
author = {Seongeon Kim},
year = {2025},
howpublished = {\url{https://huggingface.co/SeongeonKim/Qwen2.5-0.5B-schoolmath_v1}},
}