1from transformers import pipeline
23question ="If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"4generator = pipeline("text-generation", model="andresnowak/Qwen3-0.6B-instruction-finetuned_v2", device="cuda")5output = generator([{"role":"user","content": question}], max_new_tokens=128, return_full_text=False)[0]6print(output["generated_text"])
This model was trained with SFT, and the idea was to train only on completion loss and we removed all examples that have a combined (prompt and completion) token size bigger than 2048
Training arguments
yaml
1defaults:2-override hydra/job_logging: disabled
34environment:5seed:426use_template:True78model:9name: Qwen/Qwen3-0.6B-Base
10hub_model_id: andresnowak/Qwen3-0.6B-instruction-finetuned_v2
1112# Hardcoded subset dataset is just to make the model answer that is from allenai tulu basically13dataset:14-name: andresnowak/Instruction-finetuning-mixture-mnlp
15config: codeAlpaca
16size:0.317-name: andresnowak/Instruction-finetuning-mixture-mnlp
18config: noRobots
19size:0.820-name: andresnowak/Instruction-finetuning-mixture-mnlp
21config: openMathGsm8k
22size:0.523-name: andresnowak/Instruction-finetuning-mixture-mnlp
24config: codeV2
25size:0.326-name: andresnowak/Instruction-finetuning-mixture-mnlp
27config: flanV2
28size:0.829-name: andresnowak/Instruction-finetuning-mixture-mnlp
30config: ifData
31size:0.832-name: andresnowak/Instruction-finetuning-mixture-mnlp
33config: mathAlgebra
34size:0.435-name: andresnowak/Instruction-finetuning-mixture-mnlp
36config: mathGrade
37size:0.438-name: andresnowak/Instruction-finetuning-mixture-mnlp
39config: oasst1
40size:0.441-name: andresnowak/Instruction-finetuning-mixture-mnlp
42config: sciriff
43size:0.844-name: andresnowak/Instruction-finetuning-mixture-mnlp
45config: tableGpt
46size:0.247-name: andresnowak/Instruction-finetuning-mixture-mnlp
48config: tirMath
49size:0.550-name: andresnowak/Instruction-finetuning-mixture-mnlp
51config: wildChat
52size:0.653-name: andresnowak/Instruction-finetuning-mixture-mnlp
54config: mathV5
55size:0.35657dataset_evaluation:58-name: cais/mmlu
59config: validation
60subjects:["abstract_algebra","anatomy","astronomy","college_biology","college_chemistry","college_computer_science","college_mathematics","college_physics","computer_security","conceptual_physics","electrical_engineering","elementary_mathematics","high_school_biology","high_school_chemistry","high_school_computer_science","high_school_mathematics","high_school_physics","high_school_statistics","machine_learning"]6162training:63output_dir: ./output
64logging_dir: ./logs
65resume_dir: None
66report_to: wandb
67learning_rate:0.00001# Default value instead of 5e-668per_device_train_batch_size:469per_device_eval_batch_size:470gradient_accumulation_steps:32# to get effective 12871num_train_epochs:272weight_decay:0.0073warmup_ratio:0.0374max_grad_norm:1.075# linear_layers_max_grad_norm: 0.576lr_scheduler:"linear"77completion_only_loss:True7879wandb:80project: MNLP-qwen-instruction-finetuning
81name: qwen-instruction-finetuning_v2
Evaluation results
The model was evaluated on a suite of Multiple Choice Question Answering (MCQA) benchmarks (on its validation and test sets repsectively for each one),
and NLP4education is only the approximated 1000 question and answers given to use.
The performance on the MCQA benchmarks is:
First evaluation: The tests where done with this prompt (type 5):
This question assesses challenging STEM problems as found on graduate standardized tests. Carefully evaluate the options and select the correct answer.
---
[Insert Question Here]
---
[Insert Choices Here, e.g.:
A. Option 1
B. Option 2
C. Option 3
D. Option 4]
---
Your response should include the letter and the exact text of the correct choice.
Example: B. Entropy increases.
Answer:
And the teseting was done on [Letter]. [Text answer]
Benchmark
Accuracy (Acc)
Normalized Accuracy (Acc Norm)
ARC Challenge
57.99%
55.61%
ARC Easy
75.02%
69.69%
GPQA
32.59%
30.13%
Math QA
22.39%
21.59%
MCQA Evals
38.70%
36.62%
MMLU
46.11%
46.11%
MMLU Pro
13.57%
11.50%
MuSR
42.99%
41.93%
NLP4Education
41.75%
39.80%
Overall
41.23%
39.22%
Second evaluation: (type 0)
The following are multiple choice questions (with answers) about knowledge and skills in advanced master-level STEM courses.
---
*[Insert Question Here]*
---
*[Insert Choices Here, e.g.:*
*A. Option 1*
*B. Option 2*
*C. Option 3*
*D. Option 4]*
---
Answer:
And the teseting was done on [Letter]. [Text answer]
Benchmark
Accuracy (Acc)
Normalized Accuracy (Acc Norm)
ARC Challenge
60.23%
58.87%
ARC Easy
78.11%
74.88%
GPQA
31.47%
28.35%
Math QA
24.80%
24.83%
MCQA Evals
41.30%
37.92%
MMLU
46.05%
46.05%
MMLU Pro
14.97%
13.64%
MuSR
42.99%
41.93%
NLP4Education
44.84%
42.65%
Overall
42.75%
41.01%
Third evaluation: (type 2)
This is part of an assessment on graduate-level science, technology, engineering, and mathematics (STEM) concepts. Each question is multiple-choice and requires a single correct answer.
---
*[Insert Question Here]*
---
*[Insert Choices Here, e.g.:*
*A. Option 1*
*B. Option 2*
*C. Option 3*
*D. Option 4]*
---
For grading purposes, respond with: [LETTER]. [VERBATIM TEXT]
Example: D. Planck constant
Your Response:
And the teseting was done on [Letter]. [Text answer]
Benchmark
Accuracy (Acc)
Normalized Accuracy (Acc Norm)
ARC Challenge
44.39%
44.39%
ARC Easy
61.78%
61.78%
GPQA
23.44%
23.44%
Math QA
23.33%
23.33%
MCQA Evals
34.81%
34.81%
MMLU
45.99%
45.99%
MMLU Pro
14.09%
14.09%
MuSR
45.50%
45.50%
NLP4Education
34.91%
34.91%
Overall
36.47%
36.47%
First evaluation: (type 0)
The following are multiple choice questions (with answers) about knowledge and skills in advanced master-level STEM courses.
---
*[Insert Question Here]*
---
*[Insert Choices Here, e.g.:*
*A. Option 1*
*B. Option 2*
*C. Option 3*
*D. Option 4]*
---
Answer:
And the teseting was done on [Letter]
Benchmark
Accuracy (Acc)
Normalized Accuracy (Acc Norm)
ARC Challenge
62.20%
62.20%
ARC Easy
79.23%
79.23%
GPQA
29.02%
29.02%
Math QA
25.39%
25.39%
MCQA Evals
43.90%
43.90%
MMLU
46.02%
46.02%
MMLU Pro
16.37%
16.37%
MuSR
45.50%
45.50%
NLP4Education
46.25%
46.25%
Overall
43.76%
43.76%
Framework versions
TRL: 0.18.1
Transformers: 4.52.4
Pytorch: 2.7.0
Datasets: 3.6.0
Tokenizers: 0.21.0
Citations
Cite TRL as:
bibtex
1@misc{vonwerra2022trl,
2 title = {{TRL: Transformer Reinforcement Learning}},
3 author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
4 year = 2020,
5 journal = {GitHub repository},
6 publisher = {GitHub},
7 howpublished = {\url{https://github.com/huggingface/trl}}
8}