{"id":{"repo_id":"chalmers","oai_identifier":"oai:odr.chalmers.se:20.500.12380/311643"},"canonical_url":"https://search.ndltd.org/etd/chalmers/oai:odr.chalmers.se:20.500.12380/311643","repository":{"repo_id":"chalmers","name":"Chalmers University of Technology","base_url":"https://odr.chalmers.se/oai/request"},"display":{"title":"Accelerating Token Generation in Large Reasoning Models Using FlashHead","abstract":"Large Reasoning Models (LRMs) improve performance on complex reasoning tasks by generating long intermediate reasoning traces, but this increases inference la tency under autoregressive decoding. A significant part of this cost can come from the language modeling head, which computes logits over the full vocabulary at ev ery decoding step. This thesis studies FlashHead, a training-free retrieval-based alternative to dense output embedding computation, as a way to accelerate token generation in LRMs. FlashHead replaces full-vocabulary scoring with a two-stage retrieval procedure: cen troid screening followed by exact scoring over a reduced candidate set. In this work, FlashHead is integrated into the DeepSeek-R1-Distill-Qwen-1.5B inference pipeline. The implementation includes offline clustering of the output embedding matrix, construction of FlashHead assets, output embedding reordering, CSR-style cluster metadata, and a Triton-based fused GPU kernel for candidate scoring. The system is evaluated on MMLU-Pro, IFEval, and GSM8K with chain-of-thought prompting. We compare the dense baseline with both a PyTorch FlashHead im plementation and an optimized reorder + Triton variant, using task-level metrics, next-token fidelity, time-per-output-token, and FlashHead-only latency. The results show that FlashHead preserves task-level performance on IFEval and MMLU-Pro, while incurring a modest degradation on GSM8K-CoT. Token-level fidelity remains high, with Top-1 agreement above 0.95 across the evaluated token level datasets. The optimized reorder + Triton implementation reduces FlashHead only latency compared with the PyTorch implementation, although the end-to-end speedup remains limited by the Transformer body and other decoding overheads. These findings suggest that retrieval-based output embedding computation can re duce the cost of token generation when combined with system-level GPU opti mization. However, the observed quality and efficiency trade-offs remain workload dependent, highlighting the need for further improvements in candidate selection and end-to-end decoding performance.","abstract_html":"Large Reasoning Models (LRMs) improve performance on complex reasoning tasks by generating long intermediate reasoning traces, but this increases inference la tency under autoregressive decoding. A significant part of this cost can come from the language modeling head, which computes logits over the full vocabulary at ev ery decoding step. This thesis studies FlashHead, a training-free retrieval-based alternative to dense output embedding computation, as a way to accelerate token generation in LRMs. FlashHead replaces full-vocabulary scoring with a two-stage retrieval procedure: cen troid screening followed by exact scoring over a reduced candidate set. In this work, FlashHead is integrated into the DeepSeek-R1-Distill-Qwen-1.5B inference pipeline. The implementation includes offline clustering of the output embedding matrix, construction of FlashHead assets, output embedding reordering, CSR-style cluster metadata, and a Triton-based fused GPU kernel for candidate scoring. The system is evaluated on MMLU-Pro, IFEval, and GSM8K with chain-of-thought prompting. We compare the dense baseline with both a PyTorch FlashHead im plementation and an optimized reorder + Triton variant, using task-level metrics, next-token fidelity, time-per-output-token, and FlashHead-only latency. The results show that FlashHead preserves task-level performance on IFEval and MMLU-Pro, while incurring a modest degradation on GSM8K-CoT. Token-level fidelity remains high, with Top-1 agreement above 0.95 across the evaluated token level datasets. The optimized reorder + Triton implementation reduces FlashHead only latency compared with the PyTorch implementation, although the end-to-end speedup remains limited by the Transformer body and other decoding overheads. These findings suggest that retrieval-based output embedding computation can re duce the cost of token generation when combined with system-level GPU opti mization. However, the observed quality and efficiency trade-offs remain workload dependent, highlighting the need for further improvements in candidate selection and end-to-end decoding performance.","abstract_has_math":false,"creators":["Tong, Fengming","Tang, Yanping"],"institution":null,"degree_name":null,"degree_level":"H","degree_discipline":null,"degree_department":"Chalmers tekniska högskola / Institutionen för data och informationsteknik","school":null,"contributors":[],"advisors":["Karppa, Matti"],"committee_chairs":[],"committee_members":["Dubhashi, Devdatt"],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-19T03:03:51Z","subjects":["Large Reasoning Models, FlashHead, inference acceleration, output embedding, approximate retrieval, Triton"],"languages":["eng"],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.coursecode","label":"Dc Identifier Coursecode","values":["DATX05"],"render_values":[{"text":"DATX05","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/20.500.12380/311643","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/20.500.12380/311643","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Achalmers%3Aoai%3Aodr.chalmers.se%3A20.500.12380%2F311643","prefix":"oai_dc"},"source_record":{"url":"https://odr.chalmers.se/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aodr.chalmers.se%3A20.500.12380%2F311643","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Dubhashi, Devdatt"]},{"key":"dc:contributor.department","label":"Department","values":["Chalmers tekniska högskola / Institutionen för data och informationsteknik","Chalmers University of Technology / Department of Computer Science and Engineering"]},{"key":"dc:contributor.supervisor","label":"Supervisor","values":["Karppa, Matti"]},{"key":"dc:creator","label":"Author","values":["Tong, Fengming","Tang, Yanping"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2026-06-30T07:28:07Z"]},{"key":"dc:date.issued","label":"Date","values":["2026"]},{"key":"dc:publisher.program","label":"Dc Publisher Program","values":["High-performance computer systems (MPHPC), MSc"]},{"key":"dc:type.degree","label":"Dc Type Degree","values":["Examensarbete för masterexamen","Master's Thesis"]},{"key":"thesis:degree_level","label":"Degree Level","values":["H"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Large Reasoning Models, FlashHead, inference acceleration, output embedding, approximate retrieval, Triton"]},{"key":"dc:subject.uppsok","label":"Dc Subject Uppsok","values":["Technology"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["eng"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.coursecode","label":"Dc Identifier Coursecode","values":["DATX05"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/20.500.12380/311643"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Large Reasoning Models (LRMs) improve performance on complex reasoning tasks by generating long intermediate reasoning traces, but this increases inference la tency under autoregressive decoding. A significant part of this cost can come from the language modeling head, which computes logits over the full vocabulary at ev ery decoding step. This thesis studies FlashHead, a training-free retrieval-based alternative to dense output embedding computation, as a way to accelerate token generation in LRMs. FlashHead replaces full-vocabulary scoring with a two-stage retrieval procedure: cen troid screening followed by exact scoring over a reduced candidate set. In this work, FlashHead is integrated into the DeepSeek-R1-Distill-Qwen-1.5B inference pipeline. The implementation includes offline clustering of the output embedding matrix, construction of FlashHead assets, output embedding reordering, CSR-style cluster metadata, and a Triton-based fused GPU kernel for candidate scoring. The system is evaluated on MMLU-Pro, IFEval, and GSM8K with chain-of-thought prompting. We compare the dense baseline with both a PyTorch FlashHead im plementation and an optimized reorder + Triton variant, using task-level metrics, next-token fidelity, time-per-output-token, and FlashHead-only latency. The results show that FlashHead preserves task-level performance on IFEval and MMLU-Pro, while incurring a modest degradation on GSM8K-CoT. Token-level fidelity remains high, with Top-1 agreement above 0.95 across the evaluated token level datasets. The optimized reorder + Triton implementation reduces FlashHead only latency compared with the PyTorch implementation, although the end-to-end speedup remains limited by the Transformer body and other decoding overheads. These findings suggest that retrieval-based output embedding computation can re duce the cost of token generation when combined with system-level GPU opti mization. However, the observed quality and efficiency trade-offs remain workload dependent, highlighting the need for further improvements in candidate selection and end-to-end decoding performance."]},{"key":"dc:title","label":"Title","values":["Accelerating Token Generation in Large Reasoning Models Using FlashHead"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.committeemember":["Dubhashi, Devdatt"],"dc:contributor.department":["Chalmers tekniska högskola / Institutionen för data och informationsteknik","Chalmers University of Technology / Department of Computer Science and Engineering"],"dc:contributor.supervisor":["Karppa, Matti"],"dc:creator":["Tong, Fengming","Tang, Yanping"],"dc:date.accessioned":["2026-06-30T07:28:07Z"],"dc:date.issued":["2026"],"dc:description.abstract":["Large Reasoning Models (LRMs) improve performance on complex reasoning tasks by generating long intermediate reasoning traces, but this increases inference la tency under autoregressive decoding. A significant part of this cost can come from the language modeling head, which computes logits over the full vocabulary at ev ery decoding step. This thesis studies FlashHead, a training-free retrieval-based alternative to dense output embedding computation, as a way to accelerate token generation in LRMs. FlashHead replaces full-vocabulary scoring with a two-stage retrieval procedure: cen troid screening followed by exact scoring over a reduced candidate set. In this work, FlashHead is integrated into the DeepSeek-R1-Distill-Qwen-1.5B inference pipeline. The implementation includes offline clustering of the output embedding matrix, construction of FlashHead assets, output embedding reordering, CSR-style cluster metadata, and a Triton-based fused GPU kernel for candidate scoring. The system is evaluated on MMLU-Pro, IFEval, and GSM8K with chain-of-thought prompting. We compare the dense baseline with both a PyTorch FlashHead im plementation and an optimized reorder + Triton variant, using task-level metrics, next-token fidelity, time-per-output-token, and FlashHead-only latency. The results show that FlashHead preserves task-level performance on IFEval and MMLU-Pro, while incurring a modest degradation on GSM8K-CoT. Token-level fidelity remains high, with Top-1 agreement above 0.95 across the evaluated token level datasets. The optimized reorder + Triton implementation reduces FlashHead only latency compared with the PyTorch implementation, although the end-to-end speedup remains limited by the Transformer body and other decoding overheads. These findings suggest that retrieval-based output embedding computation can re duce the cost of token generation when combined with system-level GPU opti mization. However, the observed quality and efficiency trade-offs remain workload dependent, highlighting the need for further improvements in candidate selection and end-to-end decoding performance."],"dc:identifier.coursecode":["DATX05"],"dc:identifier.uri":["https://hdl.handle.net/20.500.12380/311643"],"dc:language.iso":["eng"],"dc:publisher.program":["High-performance computer systems (MPHPC), MSc"],"dc:subject":["Large Reasoning Models, FlashHead, inference acceleration, output embedding, approximate retrieval, Triton"],"dc:subject.uppsok":["Technology"],"dc:title":["Accelerating Token Generation in Large Reasoning Models Using FlashHead"],"dc:type.degree":["Examensarbete för masterexamen","Master's Thesis"],"others:access_status":["open.access"],"thesis:degree_level":["H"]},"updated_at":"2026-11-19T03:03:51Z"}