TorchSpec
TorchSpec copied to clipboard
A PyTorch native library for training speculative decoding models
## Summary - add a Domino draft model with a DFlash backbone and causal low-rank correction head - add the base-anchored curriculum training wrapper and trainer dispatch - register Domino...
## Summary Integrates TensorRT-LLM (v1.3.0rc18) as an inference backend for hidden-state capture, alongside the existing vLLM and SGLang backends. ## Approach TRT-LLM already ships the EAGLE3 capture machinery natively (`SaveHiddenStatesDecodingConfig`...
# TorchSpec Roadmap 2026 Q2 ## Model Support - [x] Minimax M 2.5 ## Training - [ ] **Packed sequence training**: pack multiple shorter sequences into a single training sample...
https://github.com/jianuo-huang/Domino
Implements **[#81](https://github.com/lightseekorg/TorchSpec/issues/81)** — colocate the Eagle3 / DFlash draft **trainer** and the sglang target **engine** on the **same** physical GPUs via CUDA MPS, removing the disaggregated layout's idle-GPU waste. Gated...
if getattr(args, "inference_engine_type", "hf") != "sgl": raise NotImplementedError("DFlash currently supports only inference_engine_type='sgl'.") Currently, DFlash only supports SGlang as the inference engine. Can I simply ignore this error and forcibly use...
# Design: Support co-locate training and inference ## Motivation Today `torchspec` places inference engines and the FSDP trainer on **disjoint** GPUs and ferries hidden states through a Mooncake distributed KV...
When trying to set `debug_train_only: true`, I get the following issue, ```shell [2026-04-27 13:22:40,186] factory.py:184 INFO Initializing 1 Sgl engines (2 GPU(s) each, nnodes=1, replicas=1) rgpuid: [] Traceback (most recent...
## Problem `_aggregate_metrics` (line 368-415) and `_aggregate_eval_metrics` (line 285-321) in `eagle3_trainer.py` share ~30 lines of nearly identical logic: - `torch.stack + mean + all_reduce` for plosses and acces - `simulated_acc_len`...
**Description** `DFlashAttention.__init__` in `torchspec/models/draft/dflash.py` (lines 191-195) always builds its own `DFlashRotaryEmbedding(head_dim, max_position_embeddings, base=rope_theta)`. It never reads `config.rope_scaling`. `DFlashConfig` accepts `rope_scaling` and keeps it, so the saved draft config still declares...