Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
684 commits
Select commit Hold shift + click to select a range
e109abe
Restore DSV4 attention layer norms
FurtherAI Jun 2, 2026
8e4d8b1
Keep DSV4 precision linear eager
FurtherAI Jun 2, 2026
e566b26
Materialize DSV4 RoPE caches after model init
FurtherAI Jun 2, 2026
036b7cc
Freeze DSV4 indexer and stabilize sink grad
FurtherAI Jun 2, 2026
6057f0f
Represent frozen DSV4 indexer weights as buffers
FurtherAI Jun 2, 2026
0424b85
Anchor frozen DSV4 compressor buffer loading
FurtherAI Jun 2, 2026
e35a70b
Stabilize DSV4 parity router and sink gradients
FurtherAI Jun 2, 2026
aa743e4
Return sparse DSV4 router probabilities
FurtherAI Jun 2, 2026
e7ac08a
Bufferize degenerate DSV4 top1 router gates
FurtherAI Jun 2, 2026
38ebce8
Use torch DSV4 sparse attention for fp32 parity
FurtherAI Jun 2, 2026
7c426df
Exclude DSV4 oracle sinks from derivative parity
FurtherAI Jun 2, 2026
71582a8
Map DSV4 bridge to source checkpoint names
FurtherAI Jun 2, 2026
3b1820f
Register DSV4 HF classes for identity LoRA
FurtherAI Jun 2, 2026
61272e5
Keep DSV4 LoRA path differentiable
FurtherAI Jun 2, 2026
d00edc8
Provide DSV4 default chat template
FurtherAI Jun 2, 2026
d812223
Apply default chat template to cached tokenizers
FurtherAI Jun 2, 2026
0c959e7
Handle DSV4 compressed attention tails
FurtherAI Jun 2, 2026
4e15ccf
Respect packed DSV4 rotary position tables
FurtherAI Jun 2, 2026
09845d7
Map DSV4 source keys during HF loading
FurtherAI Jun 2, 2026
cd9d810
Expose DSV4 source aliases after HF load
FurtherAI Jun 2, 2026
13baa60
Align DSV4 HF compressor oracle precision
FurtherAI Jun 2, 2026
21f183f
Align DSV4 HF indexer rotation
FurtherAI Jun 2, 2026
ea6eee5
Match DSV4 HF oracle compressor weight dtype
FurtherAI Jun 2, 2026
a9d5d8c
Use exact DSV4 indexer topk
FurtherAI Jun 2, 2026
b16240c
Document exact DSV4 indexer routing
FurtherAI Jun 2, 2026
9a71696
Register DSV4 workflow representative
FurtherAI Jun 2, 2026
736f27d
Add DSV4 attention LoRA surfaces
FurtherAI Jun 2, 2026
2d327d4
Disambiguate DSV4 expert weight orientation
FurtherAI Jun 2, 2026
759bbe2
Respect model CP support in provider defaults
FurtherAI Jun 2, 2026
a4b3481
Align DSV4 chat encoding with vLLM
FurtherAI Jun 2, 2026
a32fef7
Scope model-support tokenizers to Megatron
FurtherAI Jun 2, 2026
26c11ec
Add DSV4 workflow resource topology defaults
FurtherAI Jun 2, 2026
6310f8e
Document DSV4 HC kernel toolchain constraint
FurtherAI Jun 3, 2026
a73e11a
Use representative DSV4 layers in runtime workflow
FurtherAI Jun 3, 2026
29a1c2e
Dequantize DSV4 Flash weights on bridge import
FurtherAI Jun 3, 2026
3933afa
Avoid fused-expert slicing for DSV4 per-expert weights
FurtherAI Jun 3, 2026
6b4cc8c
Lazy-load DSV4 TileLang kernels
FurtherAI Jun 3, 2026
bf1c5b3
Set DSV4 validation vLLM launch args
FurtherAI Jun 3, 2026
372e91a
Restore env after DSV4 TileLang imports
FurtherAI Jun 3, 2026
f167e48
Align DSV4 compressor param dtype with config
FurtherAI Jun 3, 2026
8272d5f
Respect CP support in oracle topology selection
FurtherAI Jun 3, 2026
e1ad1ad
Use CP-free MoE oracle topology for CP-unsupported models
FurtherAI Jun 3, 2026
c13ca33
Format single-local-expert LoRA keys
FurtherAI Jun 3, 2026
28ea416
Initialize DSV4 oracle base weights
FurtherAI Jun 3, 2026
d5acb45
Honor DSV4 packed raw attention positions
FurtherAI Jun 3, 2026
c88a60a
Support DSV4 shared-prefix compression layout
FurtherAI Jun 3, 2026
9a2a6cf
Align DSV4 compressor softmax precision
FurtherAI Jun 3, 2026
fab687f
Compact DSV4 shared-prefix indexer candidates
FurtherAI Jun 3, 2026
0a96829
Use branch-local CSA compressed prefixes
FurtherAI Jun 3, 2026
4ce47bd
Align DSV4 fp32 sparse attention fallback
FurtherAI Jun 3, 2026
cc74786
Revert "Align DSV4 fp32 sparse attention fallback"
FurtherAI Jun 3, 2026
106128d
Use production CSA topk in DSV4 oracle
FurtherAI Jun 3, 2026
af25b48
Use merged rollout for DSV4 train-inf validation
FurtherAI Jun 3, 2026
48f30ff
Keep DSV4 TileLang paths out of child env
FurtherAI Jun 3, 2026
cedba7c
Clean TileLang env from DSV4 LoRA export
FurtherAI Jun 3, 2026
7794030
Revert "Clean TileLang env from DSV4 LoRA export"
FurtherAI Jun 3, 2026
a464411
Clean TileLang composable-kernel env path
FurtherAI Jun 3, 2026
52204c6
Fix DSV4 final norm source mapping
FurtherAI Jun 3, 2026
4fecadb
Fix DSV4 merged LoRA adapter export
FurtherAI Jun 3, 2026
a0f07f6
Fix DSV4 vLLM expert export
FurtherAI Jun 3, 2026
cd5c8a7
Keep DSV4 parity export in HF domain
FurtherAI Jun 3, 2026
9bfb64d
Restore canonical DSV4 bridge exports
FurtherAI Jun 3, 2026
c3ea93f
Seed DSV4 oracle hash routing tables
FurtherAI Jun 3, 2026
e67f67e
Fix DSV4 vLLM LoRA import mapping
FurtherAI Jun 3, 2026
cee3b2f
Use dummy vLLM load for reduced DSV4 runtime gates
FurtherAI Jun 4, 2026
08fb87a
Sanitize DSV4 TileLang env before vLLM launch
FurtherAI Jun 4, 2026
0e0aed1
Sanitize vLLM runtime child env
FurtherAI Jun 4, 2026
e346a5b
Propagate DSV4 train-inf Megatron env
FurtherAI Jun 4, 2026
8e91081
Patch vLLM reload shadow attrs
FurtherAI Jun 4, 2026
8eac30d
Reserve DSV4 vLLM reload headroom
FurtherAI Jun 4, 2026
c2b07b4
Support DSV4 workflow resources on high-VRAM hosts
FurtherAI Jun 8, 2026
5a768c7
Support CUDA 13 vLLM runtime builds
FurtherAI Jun 8, 2026
4265a14
Split DSV4 GB300 workflow resources
FurtherAI Jun 8, 2026
093e894
Preserve DSV4 oracle topology coverage without CP
FurtherAI Jun 8, 2026
5bc189a
Fit DSV4 CP-free oracle topologies on 4 GPUs
FurtherAI Jun 8, 2026
3f929b5
Support CUDA 13 Megatron setup on GB300
FurtherAI Jun 9, 2026
5f3315a
Enable DSV4 native vLLM LoRA support
FurtherAI Jun 9, 2026
9a96b68
Cover DSV4 LoRA vLLM loader format
FurtherAI Jun 9, 2026
f1319e8
Proxy DSV4 LoRA FP8 scale metadata
FurtherAI Jun 9, 2026
3cdb478
Proxy DSV4 LoRA router metadata
FurtherAI Jun 9, 2026
3bd1744
Validate DSV4 native LoRA with Marlin MoE
FurtherAI Jun 9, 2026
77e02d4
Preserve Marlin MoE LoRA with DSV4 clamp
FurtherAI Jun 9, 2026
a9c5e7f
Validate DSV4 native LoRA rollout
FurtherAI Jun 9, 2026
ac14381
Sweep detached managed process children
FurtherAI Jun 9, 2026
154c83d
Use Marlin for DSV4 LoRA workflow stages
FurtherAI Jun 9, 2026
498787b
Use managed vLLM runtime in train-inf mismatch
FurtherAI Jun 9, 2026
d6cc6d1
Speed up DSV4 quantized weight loading
FurtherAI Jun 10, 2026
a1c6ef4
Fix DSV4 vLLM runtime patch for current loader
FurtherAI Jun 10, 2026
4749ae4
Allow vLLM missing branch-tail MoE routes
FurtherAI Jun 10, 2026
1846de3
Fix train-inf logical scoring map
FurtherAI Jun 10, 2026
3ba379a
Make DSV4 forward checks compile safe
FurtherAI Jun 10, 2026
5b68bcb
Preserve tagged fp32 params across Megatron wrapper
FurtherAI Jun 10, 2026
bef733c
Preserve DSV4 fp32 buffers across Megatron wrapper
FurtherAI Jun 10, 2026
385f68b
Track fp32 DSV4 buffers by module name
FurtherAI Jun 10, 2026
3a8aef3
Preserve DSV4 fp32 params by module name
FurtherAI Jun 11, 2026
45e8e01
Enable TileLang dependency on Linux aarch64
FurtherAI Jun 11, 2026
0ec8eb1
Preserve declared fp32 buffers after freeze
FurtherAI Jun 11, 2026
7e015cf
Align DSV4 sparse MLA kernel input dtypes
FurtherAI Jun 11, 2026
1d27498
Speed up DSV4 MXFP4 quant export
FurtherAI Jun 11, 2026
0289da2
Avoid DSV4 merged export metadata drain
FurtherAI Jun 11, 2026
cf5aee8
Fix dsv4 router replay in mismatch test
FurtherAI Jun 11, 2026
7a47faa
Align dsv4 sliding rope with vllm
FurtherAI Jun 11, 2026
c6c5d59
Handle empty dsv4 rotation slices
FurtherAI Jun 11, 2026
95426a8
Fix DSV4 row-parallel weight loading
FurtherAI Jun 11, 2026
ba8032f
Fix DSV4 shared expert parity path
FurtherAI Jun 11, 2026
89bfa0e
Fix DSV4 vLLM LoRA adapter cache key
FurtherAI Jun 11, 2026
6b40614
Fix DSV4 shared-prefix negative group ids
FurtherAI Jun 11, 2026
638b0d3
Improve train-inf forward trace controls
FurtherAI Jun 11, 2026
0e002ec
Align vLLM LoRA runtime target modules
FurtherAI Jun 11, 2026
13c263a
Apply DSV4 fast-path LoRA in vLLM runtime
FurtherAI Jun 11, 2026
438e3d8
Track train-inf adapter cache reuse
FurtherAI Jun 11, 2026
37c69e8
Prune stale train-inf adapter caches
FurtherAI Jun 11, 2026
25f98b2
Restore Bridge collective scatter
FurtherAI Jun 12, 2026
dca3885
Clarify DSV4 vLLM LoRA target mapping
FurtherAI Jun 16, 2026
4a0ac34
Optimize DSV4 wo_a LoRA fast path
FurtherAI Jun 16, 2026
1e6a3cb
Register DSV4 LoRA Triton op before compiled forward
FurtherAI Jun 17, 2026
7aa6fd3
Improve DSV4 train-inf runtime fidelity
FurtherAI Jun 18, 2026
84d9e36
Remove DSV4 QAT simulation path
FurtherAI Jun 18, 2026
2a7d5db
Relax DSV4 train-inf mismatch thresholds
FurtherAI Jun 19, 2026
f6895d9
Align DSV4 train-inf config test with Marlin backend
FurtherAI Jun 19, 2026
1ccbfa4
Use DSV4 Triton unfused vLLM backend
FurtherAI Jun 19, 2026
5a6d371
Add DSV4 bf16 real-path correctness test
FurtherAI Jun 19, 2026
42a8cf2
Regenerate pruned oracle topology artifacts
FurtherAI Jun 19, 2026
8c03fed
Make DSV4 oracle shape TP compatible
FurtherAI Jun 19, 2026
828daf4
Require complete oracle artifacts before reuse
FurtherAI Jun 19, 2026
b624cea
Write DSV4 correctness logs to standard paths
FurtherAI Jun 19, 2026
b63642f
Shard DSV4 oracle random base init by TP rank
FurtherAI Jun 19, 2026
165bce4
Handle DSV4 oracle TP shards without attrs
FurtherAI Jun 19, 2026
aad8a90
Keep DSV4 attention eager for LoRA gradients
FurtherAI Jun 19, 2026
fc49cea
Fix DSV4 SP gather gradient reduction
FurtherAI Jun 19, 2026
daacec3
Seed nested DSV4 shared expert TP weights
FurtherAI Jun 19, 2026
0df95b4
Shard DSV4 shared expert oracle gate-up components
FurtherAI Jun 19, 2026
00405f2
Run DSV4 correctness on bf16 LoRA path
FurtherAI Jun 19, 2026
f897c2d
Keep DSV4 oracle experts grouped under EP
FurtherAI Jun 19, 2026
ff96f9a
Avoid TP grad sync for DSV4 replicated LoRA
FurtherAI Jun 19, 2026
4525242
Sync DSV4 q_b LoRA input gradients across TP
FurtherAI Jun 19, 2026
5e75e20
Use wider DSV4 oracle attention head count
FurtherAI Jun 19, 2026
d8d8853
Split DSV4 attention SP gather gradients
FurtherAI Jun 19, 2026
c43627b
Preserve layer axis for heterogeneous oracle rows
FurtherAI Jun 19, 2026
c0438d7
Attach DSV4 trace row UIDs after SP scatter
FurtherAI Jun 19, 2026
f31abb5
Trim non-CP oracle traces by physical rows
FurtherAI Jun 19, 2026
3ac6f47
Clean up oracle worker process groups
FurtherAI Jun 19, 2026
5ae5140
Keep DSV4 ETP shared expert LoRA out of compile
FurtherAI Jun 19, 2026
73e618e
Keep routing trace hooks out of Dynamo
FurtherAI Jun 19, 2026
82376f3
Serialize QuACK grouped LoRA compile misses
FurtherAI Jun 19, 2026
caecb52
Slice DSV4 oracle expert weights by ETP rank
FurtherAI Jun 19, 2026
becac24
Slice DSV4 oracle grouped expert ETP weights
FurtherAI Jun 19, 2026
acb9729
Prefer dense trace UIDs for sequence modules
FurtherAI Jun 19, 2026
d870375
Restore dense non-CP sequence trace rows
FurtherAI Jun 19, 2026
1b7fb62
Limit dense trace row restore to merged ranks
FurtherAI Jun 19, 2026
2c2978d
Guard DSV4 ETP TE permutation autotune
FurtherAI Jun 19, 2026
04f9510
Use shared DSV4 trainability resources
FurtherAI Jun 19, 2026
03d117f
Add DSV4 length trainability validation
FurtherAI Jun 19, 2026
9256ff5
Support external vLLM runtime mode
FurtherAI Jun 22, 2026
2fa37ce
Limit external runtime support to Megatron
FurtherAI Jun 22, 2026
60161ea
Isolate FlashInfer cache for managed vLLM runtime
FurtherAI Jun 22, 2026
6fe137e
Use one vLLM LoRA slot for DSV4
FurtherAI Jun 22, 2026
adddc94
Use standard vLLM LoRA slots for DSV4
FurtherAI Jun 22, 2026
a908bec
Cover DSV4 compressor LoRA wrapper path
FurtherAI Jun 22, 2026
2c8f442
Support multi-adapter DSV4 compressor LoRA
FurtherAI Jun 22, 2026
15c0782
Support external vLLM in train inf mismatch
FurtherAI Jun 23, 2026
7756b53
Use CPU object collectives in train inf mismatch
FurtherAI Jun 23, 2026
583e27a
Support external vLLM trainability validation
FurtherAI Jun 23, 2026
8de0328
Allow overriding length trainability streaming offload
FurtherAI Jun 23, 2026
2baed13
Preserve MoE routing replay patches across RL jobs
FurtherAI Jun 23, 2026
a306edd
Clone routing replay tensors loaded from disk
FurtherAI Jun 23, 2026
9061c3e
Fix Megatron CUDA torch lock resolution
FurtherAI Jun 23, 2026
aae5c2c
Keep routing replay target prep out of Dynamo
FurtherAI Jun 23, 2026
1813f17
Cache DSV4 router hash-layer status
FurtherAI Jun 23, 2026
2b86a5f
Specialize DSV4 router compiled paths
FurtherAI Jun 23, 2026
47c5749
Specialize routing replay wrappers by router path
FurtherAI Jun 23, 2026
c522e2b
Remove unused DSV4 activation quantization port
FurtherAI Jun 23, 2026
1f133b6
Optimize DSV4 shared-prefix compression setup
FurtherAI Jun 23, 2026
fa30ead
Use TileLang for DSV4 shared-prefix indexer
FurtherAI Jun 24, 2026
065aea6
Optimize DSV4 sparse attention metadata paths
FurtherAI Jun 24, 2026
4477d8f
Clean generated live validation artifacts
FurtherAI Jun 24, 2026
b21926d
Keep DSV4 indexer topk inside indexer wrapper
FurtherAI Jun 24, 2026
b25271c
Reduce TP weight load memory
FurtherAI Jun 24, 2026
6b746b3
Lazy share DSV4 rope cache
FurtherAI Jun 24, 2026
9f925fd
Free adapter-only train inf runtime
FurtherAI Jun 24, 2026
a91329c
Disable DSV4 vLLM custom all-reduce
FurtherAI Jun 24, 2026
259a9fd
Disable DSV4 vLLM allreduce RMS fusion
FurtherAI Jun 24, 2026
365e655
Disable DSV4 vLLM CUDA graphs
FurtherAI Jun 24, 2026
a788ede
Use DSV4 eager vLLM validation resources
FurtherAI Jun 24, 2026
cae7d1d
Build DSV4 layouts in train inf logits
FurtherAI Jun 25, 2026
3671002
Remove CUDA 13 setup from DSV4 branch
FurtherAI Jun 25, 2026
c4b3a4e
Upgrade Transformers for native DSV4
FurtherAI Jun 25, 2026
30b259c
Drop obsolete DSV4 oracle flags
FurtherAI Jun 25, 2026
46ebd8c
Derive DSV4 compression pattern from native HF config
FurtherAI Jun 25, 2026
617bdce
Normalize DSV4 native HF parity state
FurtherAI Jun 25, 2026
5fcfc7c
Focus HF parity expert grads by routed experts
FurtherAI Jun 25, 2026
5b97ea9
Merge origin/main into dsv4 support
FurtherAI Jun 25, 2026
f0c4414
Align merge tests with dsv4 runtime config
FurtherAI Jun 25, 2026
329ef9f
Fix DSV4 workflow merge regressions
FurtherAI Jun 29, 2026
13c19f5
Fix DSV4 vLLM runtime patch compatibility
FurtherAI Jun 29, 2026
c2a65a2
Apply DSV4 resources to merged serving validation
FurtherAI Jun 29, 2026
4de663a
Patch DSV4 vLLM MoE routing topk
FurtherAI Jun 29, 2026
6157056
Fix DSV4 validation regressions
FurtherAI Jun 29, 2026
2fe78ac
Use DSV4 real-path correctness in workflow
FurtherAI Jun 29, 2026
74913cb
Tolerate tiny DSV4 bf16 correctness diffs
FurtherAI Jun 29, 2026
e591f2b
Restore DSV4 trace UID canonicalization
FurtherAI Jun 29, 2026
b3674a4
Restore DSV4 routing replay validation behavior
FurtherAI Jun 29, 2026
8597489
Restore oracle layer-stacking comparison shape
FurtherAI Jun 29, 2026
44ab2b2
Tolerate tiny DSV4 bf16 optimizer delta drift
FurtherAI Jun 29, 2026
260178b
Revert "Tolerate tiny DSV4 bf16 optimizer delta drift"
FurtherAI Jul 2, 2026
12c2c91
Restore strict DSV4 correctness thresholds
FurtherAI Jul 2, 2026
fc91771
Compare LoRA deltas from optimizer main params
FurtherAI Jul 2, 2026
e05c4c4
Revert "Compare LoRA deltas from optimizer main params"
FurtherAI Jul 2, 2026
d873ea3
Probe DSV4 delta empty cache behavior
FurtherAI Jul 2, 2026
1bc0399
Revert "Probe DSV4 delta empty cache behavior"
FurtherAI Jul 2, 2026
24fa900
Probe dense DSV4 microbatch ordering
FurtherAI Jul 2, 2026
0865c40
Probe dense shared-prefix metadata device
FurtherAI Jul 2, 2026
25d0827
Probe dense ordering with cache clear
FurtherAI Jul 2, 2026
b3024e7
Probe inline RL forward path
FurtherAI Jul 2, 2026
322f3d7
Probe skip unused DSV4 dense flex masks
FurtherAI Jul 2, 2026
90832cf
Probe disable router output trace wrapper
FurtherAI Jul 2, 2026
81404b2
Revert "Probe skip unused DSV4 dense flex masks"
FurtherAI Jul 2, 2026
76ebcca
Revert "Probe inline RL forward path"
FurtherAI Jul 2, 2026
8f9f577
Revert "Probe dense ordering with cache clear"
FurtherAI Jul 2, 2026
a6229c0
Revert "Probe dense shared-prefix metadata device"
FurtherAI Jul 2, 2026
3a8b6fe
Revert "Probe dense DSV4 microbatch ordering"
FurtherAI Jul 2, 2026
e5e7692
Avoid invasive router output tracing in correctness
FurtherAI Jul 2, 2026
b777a06
Cover non-mutating router trace row UIDs
FurtherAI Jul 6, 2026
3307f77
Preserve oracle traces for sensitivity workflow
FurtherAI Jul 6, 2026
8c2a3ae
Enable external vLLM for Megatron workflows
FurtherAI Jul 6, 2026
6bb2f56
Use vLLM LoRA targets in model config
FurtherAI Jul 6, 2026
228398c
Restore memory-efficient TP weight scatter
FurtherAI Jul 7, 2026
3bcc506
Restore no-grad streaming weight offload
FurtherAI Jul 7, 2026
ab6d84a
Restore train-inf worker streaming offload
FurtherAI Jul 7, 2026
e691717
Restore DSV4 train-inf tokenizer configuration
FurtherAI Jul 7, 2026
a5e6586
Restore train-inf registration env scope
FurtherAI Jul 7, 2026
38284a3
Disable async scheduling for expert replay vllm
FurtherAI Jul 7, 2026
3e350c3
Restore train-inf object gather safeguards
FurtherAI Jul 7, 2026
ef68450
Restore adapter-only CPU synchronization
FurtherAI Jul 7, 2026
a83fcbe
Revert "Restore train-inf object gather safeguards"
FurtherAI Jul 7, 2026
f6b14dd
Revert "Disable async scheduling for expert replay vllm"
FurtherAI Jul 7, 2026
f9676cd
Revert "Restore adapter-only CPU synchronization"
FurtherAI Jul 7, 2026
0c62f1f
Use external vLLM DSV4 validation topology
FurtherAI Jul 7, 2026
08a54a2
Raise DSV4 train-inf KL threshold
FurtherAI Jul 7, 2026
bc958ef
Add DSV4 length trainability resources
FurtherAI Jul 7, 2026
e08ae5c
Remove stale Megatron topology config plumbing
FurtherAI Jul 7, 2026
4c0379b
Keep train-inf default TP independent of CP
FurtherAI Jul 7, 2026
53af34d
Isolate DSV4 vLLM runtime patches
FurtherAI Jul 7, 2026
bcd831a
Trim DSV4 vLLM runtime patch tests
FurtherAI Jul 7, 2026
2ed3e92
Trim redundant DSV4 validation tests
FurtherAI Jul 7, 2026
5b3fe34
Fix vLLM runtime LoRA delta typing
FurtherAI Jul 7, 2026
c19c84e
Merge origin/main into DSV4 support
FurtherAI Jul 8, 2026
ab3eb7e
Fix backend extra transformers compatibility
FurtherAI Jul 8, 2026
0b395b7
Fix CI unit expectations
FurtherAI Jul 8, 2026
af1659d
Isolate DSV4 shared-prefix state hooks
FurtherAI Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ megatron = [
"nvidia-ml-py==13.580.82",
"nvidia-modelopt>=0.42.0a0 ; sys_platform != 'darwin'",
"nvidia-resiliency-ext<0.5 ; sys_platform == 'linux'",
"transformers==5.6.2",
"transformers==5.12.1",
"ml-dtypes>=0.5.0 ; python_full_version < '3.13'",
]

Expand Down Expand Up @@ -194,10 +194,8 @@ name = "deep-ep"
version = "1.2.1+9af0e0d"
requires-dist = []

# The Megatron Bridge source metadata currently requires Transformers 5.8.x,
# but this branch is validated against Transformers 5.6.2 for Gemma 4.
# Keep Bridge's runtime deps explicit here and let ART's megatron extra own the
# Transformers pin.
# Transformers pin validated by model-support handlers in this branch.
[[tool.uv.dependency-metadata]]
name = "megatron-bridge"
version = "0.5.0+e1a207ac"
Expand Down
9 changes: 8 additions & 1 deletion src/art/dev/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
TinkerNativeArgs,
TinkerTrainingClientArgs,
TrainerArgs,
VllmRuntimeArgs,
)
from .openai_server import OpenAIServerConfig, ServerArgs, get_openai_server_config
from .train import TrainConfig, TrainSFTConfig
from .validate import is_dedicated_mode, validate_dedicated_config
from .validate import (
is_dedicated_mode,
is_external_vllm_mode,
validate_dedicated_config,
)

__all__ = [
"EngineArgs",
Expand All @@ -25,8 +30,10 @@
"TinkerNativeArgs",
"TinkerTrainingClientArgs",
"TrainerArgs",
"VllmRuntimeArgs",
"get_openai_server_config",
"is_dedicated_mode",
"is_external_vllm_mode",
"OpenAIServerConfig",
"ServerArgs",
"TrainSFTConfig",
Expand Down
13 changes: 11 additions & 2 deletions src/art/dev/get_model_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from ..megatron.model_support import default_target_modules_for_model
from ..megatron.model_support import (
default_target_modules_for_model,
vllm_lora_config_for_model,
)
from .engine import EngineArgs
from .model import (
PEFT_ARGS_MIGRATION_MESSAGE,
Expand Down Expand Up @@ -67,7 +70,11 @@ def get_model_config(
if rollout_weights_mode == "lora" and "lora_target_modules" not in config.get(
"engine_args", {}
):
engine_args["lora_target_modules"] = merged_lora_config["target_modules"]
engine_args["lora_target_modules"] = vllm_lora_config_for_model(
base_model,
dict(merged_lora_config),
allow_unvalidated_arch=True,
)["target_modules"]
trainer_args = TrainerArgs(
adam_beta1=0.9,
adam_beta2=0.99,
Expand Down Expand Up @@ -101,4 +108,6 @@ def get_model_config(
result["trainer_gpu_ids"] = config["trainer_gpu_ids"]
if "inference_gpu_ids" in config:
result["inference_gpu_ids"] = config["inference_gpu_ids"]
if "vllm_runtime" in config:
result["vllm_runtime"] = config["vllm_runtime"]
return result
13 changes: 13 additions & 0 deletions src/art/dev/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
from .engine import EngineArgs

RolloutWeightsMode = Literal["lora", "merged"]
VllmRuntimeMode = Literal["managed", "external"]


class VllmRuntimeArgs(TypedDict, total=False):
mode: Required[VllmRuntimeMode]
server_url: str
api_key: str | None
local_checkpoint_root: str | None
server_checkpoint_root: str | None
health_timeout_s: float


# Vendored from transformers.training_args.OptimizerNames
Expand Down Expand Up @@ -135,6 +145,8 @@ class InternalModelConfig(TypedDict, total=False):
chat_template_content_format: vLLM chat template content format.
chat_template_tool_schema_format: Tool schema rendering format used for
local training tokenization.
vllm_runtime: vLLM runtime location. Omit for ART-managed local runtime;
set mode="external" to attach to a pre-launched vLLM server.
allow_unvalidated_arch: Permit model-support validation workflows to run
architectures that are not yet in the supported-model registry.
"""
Expand All @@ -152,6 +164,7 @@ class InternalModelConfig(TypedDict, total=False):
chat_template_path: str
chat_template_content_format: str
chat_template_tool_schema_format: Literal["default", "vllm_openai"]
vllm_runtime: VllmRuntimeArgs
allow_unvalidated_arch: bool


Expand Down
42 changes: 40 additions & 2 deletions src/art/dev/validate.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
"""Validation functions for model configuration."""

from .model import InternalModelConfig, RolloutWeightsMode
from collections.abc import Mapping
from typing import cast

from .model import InternalModelConfig, RolloutWeightsMode, VllmRuntimeMode


def _vllm_runtime_mode(config: InternalModelConfig) -> VllmRuntimeMode:
runtime_config = config.get("vllm_runtime", {})
if not isinstance(runtime_config, Mapping):
raise ValueError("vllm_runtime must be a mapping")
mode = runtime_config.get("mode", "managed")
if mode in {"managed", "external"}:
return cast(VllmRuntimeMode, mode)
raise ValueError("vllm_runtime.mode must be either 'managed' or 'external'")


def is_external_vllm_mode(config: InternalModelConfig) -> bool:
return _vllm_runtime_mode(config) == "external"


def is_dedicated_mode(config: InternalModelConfig) -> bool:
"""Return True if the config specifies dedicated mode (separate training and inference GPUs)."""
return "trainer_gpu_ids" in config and "inference_gpu_ids" in config
return is_external_vllm_mode(config) or (
"trainer_gpu_ids" in config and "inference_gpu_ids" in config
)


def _rollout_weights_mode(config: InternalModelConfig) -> RolloutWeightsMode:
Expand All @@ -24,6 +43,25 @@ def validate_dedicated_config(config: InternalModelConfig) -> None:
has_trainer = "trainer_gpu_ids" in config
has_inference = "inference_gpu_ids" in config
rollout_weights_mode = _rollout_weights_mode(config)
external = is_external_vllm_mode(config)

if external:
runtime_config = config.get("vllm_runtime", {})
assert isinstance(runtime_config, Mapping)
if not runtime_config.get("server_url"):
raise ValueError("vllm_runtime.server_url is required for external mode")
if rollout_weights_mode != "lora":
raise ValueError(
"vllm_runtime.mode='external' requires rollout_weights_mode='lora'"
)
if has_trainer and not config["trainer_gpu_ids"]:
raise ValueError("trainer_gpu_ids must be non-empty")
if "fast_inference" in config.get("init_args", {}):
raise ValueError(
"fast_inference is no longer supported; ART always uses an external "
"vLLM runtime"
)
return

if has_trainer != has_inference:
raise ValueError(
Expand Down
78 changes: 72 additions & 6 deletions src/art/local/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
pull_model_from_s3,
push_model_to_s3,
)
from art.vllm_runtime import (
get_external_vllm_runtime_config,
openai_base_url_from_vllm_server_url,
)
from mp_actors import close_proxy, move_to_child_process

from .. import dev
Expand Down Expand Up @@ -111,6 +115,16 @@ def _configured_chat_template_server_arg(
return chat_template_path or chat_template


def _model_support_default_chat_template(
base_model: str,
internal_config: dev.InternalModelConfig,
) -> str | None:
handler = _model_support_handler(base_model, internal_config)
if handler is None:
return None
return handler.default_chat_template()


def _apply_configured_chat_template(
tokenizer: PreTrainedTokenizerBase,
internal_config: dev.InternalModelConfig,
Expand All @@ -120,11 +134,37 @@ def _apply_configured_chat_template(
tokenizer.chat_template = chat_template


def _model_support_handler(
base_model: str,
internal_config: dev.InternalModelConfig,
) -> Any | None:
from ..megatron.model_support.registry import (
UnsupportedModelArchitectureError,
get_model_support_handler,
)

try:
return get_model_support_handler(
base_model,
allow_unvalidated_arch=bool(
internal_config.get("allow_unvalidated_arch", False)
),
)
except UnsupportedModelArchitectureError:
return None


def _apply_configured_chat_template_server_args(
config_dict: dict,
internal_config: dev.InternalModelConfig,
*,
base_model: str | None = None,
) -> None:
chat_template = _configured_chat_template_server_arg(internal_config)
if chat_template is None and base_model is not None:
chat_template = _model_support_default_chat_template(
base_model, internal_config
)
if chat_template is None:
return
server_args = dict(config_dict.get("server_args", {}))
Expand Down Expand Up @@ -300,6 +340,19 @@ def _chat_template_tool_schema_format(
self._default_chat_template_tool_schema_format,
)

def _configure_training_tokenizer(
self,
tokenizer: PreTrainedTokenizerBase,
*,
model: AnyTrainableModel,
internal_config: dev.InternalModelConfig,
) -> PreTrainedTokenizerBase:
_apply_configured_chat_template(tokenizer, internal_config)
handler = _model_support_handler(model.base_model, internal_config)
if handler is None:
return tokenizer
return handler.configure_tokenizer(tokenizer, internal_config=internal_config)

def __enter__(self) -> Self:
return self

Expand Down Expand Up @@ -524,8 +577,11 @@ def _get_packed_tensors(
internal_config = cast(dev.InternalModelConfig, model._internal_config or {})
tokenizer_key = _tokenizer_cache_key(model.base_model, internal_config)
if tokenizer_key not in self._tokenizers:
tokenizer = AutoTokenizer.from_pretrained(model.base_model)
_apply_configured_chat_template(tokenizer, internal_config)
tokenizer = self._configure_training_tokenizer(
AutoTokenizer.from_pretrained(model.base_model),
model=model,
internal_config=internal_config,
)
self._tokenizers[tokenizer_key] = tokenizer
if model.base_model not in self._image_processors:
try:
Expand Down Expand Up @@ -702,8 +758,15 @@ async def _prepare_backend_for_training(
service = await self._get_service(model)
host, port = await service.start_openai_server(config=resolved_config)

base_url = f"http://{host}:{port}/v1"
api_key = server_args.get("api_key") or "default"
external_runtime = get_external_vllm_runtime_config(internal_config)
if external_runtime is not None:
base_url = openai_base_url_from_vllm_server_url(external_runtime.server_url)
api_key = (
server_args.get("api_key") or external_runtime.api_key or "default"
)
else:
base_url = f"http://{host}:{port}/v1"
api_key = server_args.get("api_key") or "default"

return base_url, api_key

Expand Down Expand Up @@ -1130,8 +1193,11 @@ async def _train_sft(
internal_config = cast(dev.InternalModelConfig, model._internal_config or {})
tokenizer_key = _tokenizer_cache_key(model.base_model, internal_config)
if tokenizer_key not in self._tokenizers:
tokenizer = AutoTokenizer.from_pretrained(model.base_model)
_apply_configured_chat_template(tokenizer, internal_config)
tokenizer = self._configure_training_tokenizer(
AutoTokenizer.from_pretrained(model.base_model),
model=model,
internal_config=internal_config,
)
self._tokenizers[tokenizer_key] = tokenizer
tokenizer = self._tokenizers[tokenizer_key]

Expand Down
1 change: 1 addition & 0 deletions src/art/megatron/dsv4/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading
Loading