{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2606-31048","title":"Knowledge Distillation from Large Reasoning Models to Compact Student Models: A Case Study on the John O Bryan Mathematics Competition","arxiv_id":"2606.31048","date":"2026-06-30","proceeding":null,"authors":["Gaurab Baral","Aaditya Khanal","Yangyang Tao","Junxiu Zhou"],"abstract":"This paper investigates knowledge distillation from a large reasoning model (DeepSeek-R1) to a compact student model (Qwen2.5-7B). Using historical problems from the John O'Bryan Mathematics Competition at Northern Kentucky University (2011-2025), we build a Chain-of-Thought (CoT) training corpus through a dual-agent framework. The dataset is used to fine-tune the student model with Low-Rank Adaptation (LoRA) on Apple Silicon hardware using the MLX framework. The base Qwen2.5-7B model achieves 64.67% accuracy on competition problems, while the DeepSeek-R1 teacher achieves 91.40%. An initial 1,000-iteration training run revealed severe overfitting, with validation loss reaching a minimum at iteration 200 before rising steadily. Based on this finding, we ran five independent training runs each limited to 200 iterations with varied random seeds to assess result stability. Across these five runs, the fine-tuned student model achieves a mean accuracy of 69.43% (std dev 0.17%) on the competition dataset, a 4.76 percentage-point improvement over the base model, and generalizes to 73.1% (std dev 0.18%) on the MATH-500 benchmark. We further study how response length affects answer quality across six reasoning levels (R1-R6): accuracy declines consistently from 69.43% at R1 (mean 220 words) to 41.9% at R6 (mean 31.2 words), with the two-person speed section most sensitive to token reduction. These results demonstrate that CoT distillation improves compact student models and that response length is a critical factor in mathematical reasoning quality.","url_abs":"https://arxiv.org/abs/2606.31048","url_pdf":"https://arxiv.org/pdf/2606.31048","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2606.31048","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2606.31048"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/TempGaurab/Distillation.John-O-Bryan","reach":null}],"summary":{"ran":9,"unverified":6},"by_repo_kind":{"found_in_text":{"samples":15,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":15,"samples":[{"code_sha256_prefix":"52f7f35d1d4816d1","entry":"accuracy","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"tatata.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/tatata.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"52f7f35d1d4816d1"}},{"code_sha256_prefix":"7eed778e3d54861d","entry":"call_deepseek","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"reduce_reasoning.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/reduce_reasoning.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7eed778e3d54861d"}},{"code_sha256_prefix":"2d4f6ee4beb234ea","entry":"extract_boxed","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"rab.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/rab.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2d4f6ee4beb234ea"}},{"code_sha256_prefix":"e58cca20690182df","entry":"extract_final_answer","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"rab.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/rab.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e58cca20690182df"}},{"code_sha256_prefix":"09abfe0bca3658ca","entry":"generate_reasoning_1","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"reduce_reasoning.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/reduce_reasoning.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"09abfe0bca3658ca"}},{"code_sha256_prefix":"46f8a5f590b964e9","entry":"get_difficulty_from_deepseek","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"categorize_difficulty.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/categorize_difficulty.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"46f8a5f590b964e9"}},{"code_sha256_prefix":"40b24cfba62f0cc5","entry":"load_level","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"tatata.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/tatata.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"40b24cfba62f0cc5"}},{"code_sha256_prefix":"5f20153e2525c3b3","entry":"reduce_reasoning","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"reduce_reasoning.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/reduce_reasoning.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5f20153e2525c3b3"}},{"code_sha256_prefix":"747f4d0d010adab8","entry":"word_count","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"average_words.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/average_words.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"747f4d0d010adab8"}},{"code_sha256_prefix":"62850f5141bbd737","entry":"analyze_level","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"average_words.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/average_words.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"62850f5141bbd737"}},{"code_sha256_prefix":"4a2930a1d4d99e94","entry":"call_qwen","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"qwen2.5base.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/qwen2.5base.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a2930a1d4d99e94"}},{"code_sha256_prefix":"c62c4edd22254bdb","entry":"call_with_retry","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"fine-tune-math-500.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/fine-tune-math-500.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c62c4edd22254bdb"}},{"code_sha256_prefix":"8b82a5b6d827bb61","entry":"call_with_retry","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"qwen2.5base.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/qwen2.5base.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8b82a5b6d827bb61"}},{"code_sha256_prefix":"bab09c28bffd6077","entry":"call_with_retry","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"rab.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/rab.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bab09c28bffd6077"}},{"code_sha256_prefix":"88b7820b22f2f23f","entry":"print_breakdown_table","repo":"TempGaurab/Distillation.John-O-Bryan","repo_kind":"found_in_text","path":"tatata.py","file_url":"https://github.com/TempGaurab/Distillation.John-O-Bryan/blob/HEAD/tatata.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"88b7820b22f2f23f"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}