Skip to content

Sparse parity B6: Qwen3-8B + speed improvements - #7

Open
SilenNaihin wants to merge 10 commits into
mainfrom
feat/sparse-parity-8b-speed
Open

Sparse parity B6: Qwen3-8B + speed improvements#7
SilenNaihin wants to merge 10 commits into
mainfrom
feat/sparse-parity-8b-speed

Conversation

@SilenNaihin

Copy link
Copy Markdown
Collaborator

Summary

  • Switch from Qwen3-14B to Qwen3-8B (~8B params, ~16GB bf16 vs 30GB)
  • Increase LR from 1e-6 to 5e-5 (14B LoRA stalled at <1% policy change after 20 steps)
  • Parallelize tool calls: max_parallel_calls 1 → 4 (rollout was 84% of step time)
  • Reduce gpu_memory_utilization from 0.55 to 0.45 (14B run oversubscribed at 113GB on 80GB A100)

Expected improvements:

  • 8B model fits comfortably in 80GB — no CUDA UVM spilling
  • 4x parallel tool calls should significantly reduce rollout bottleneck
  • 50x LR increase should produce meaningful policy updates

Test plan

  • Kill B5 run on a100-backup-1 tmux sdpo
  • Pull this branch and start B6 run
  • Verify GPU memory stays under 80GB (no UVM spill)
  • Check rollout_probs_diff_mean is significantly > 0.005 after warmup
  • Monitor DMC improvement over first 10 steps

🤖 Generated with Claude Code

- Model: Qwen3-14B → Qwen3-8B (~8B params, ~16GB bf16, fits in 80GB)
- LR: 1e-6 → 5e-5 (50x increase, appropriate for LoRA)
- max_parallel_calls: 1 → 4 (parallelize tool calls in rollout)
- gpu_memory_utilization: 0.55 → 0.45 (avoid CUDA UVM spilling)
- Updated critic model path and experiment name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SilenNaihin
SilenNaihin force-pushed the feat/sparse-parity-8b-speed branch from 5f5f217 to 4221d9f Compare April 10, 2026 16:28
SilenNaihin and others added 9 commits April 10, 2026 10:19
VERL's vllm_async_server overwrites config max_model_len with the HF
model's max_position_embeddings. Qwen3-8B has 40960 (vs 32768 for 14B).
Actual sequence lengths are still bounded by max_prompt+max_response=32768.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The hf_overrides rope_scaling was from 14B config and caused vLLM to
derive max_position_embeddings=32768 (from original_max_position_embeddings),
conflicting with the 40960 passed as max_model_len. Without the override,
vLLM uses the model's native 40960 and our 32768 max_model_len fits fine.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Step 3 OOM: 97GB allocated by PyTorch on 80GB A100. vLLM 0.45 × 80 = 36GB
leaves insufficient headroom for model weights + optimizer + activations.
0.35 × 80 = 28GB for vLLM, leaving ~52GB for training.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Still OOM at gpu_memory_utilization=0.35 — tried to allocate 14.38 GiB
during backward pass. Gradient checkpointing recomputes activations
instead of storing them, trading ~30% compute for significant memory savings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
OOM at logsumexp: 40960 × 151936 vocab × 4 bytes = ~23 GB logits tensor.
16384 tokens → ~9.4 GB logits, fits within remaining GPU memory after
vLLM (28 GB) + model weights (16 GB). Sequences longer than 16384 will
be split across micro-batches automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Step 4 (LR 3e-5) hit DMC 95,741 — big improvement from 637K baseline.
Steps 5-6 (LR 4e-5, 5e-5) collapsed to 999M DMC with zero rewards.
3e-5 appears to be the sweet spot for LoRA r32 on 8B model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…x_model_len

ppo_max_token_len_per_gpu resolves from ${max_model_len} in base config
and CLI overrides are silently ignored (Hydra structured config issue).
Reducing max_model_len from 32K to 16K halves the logits tensor:
16384 × 151936 × 4 = ~9.4 GB (was ~18.6 GB at 32K).

Context budget: 4K prompt + 12K response = 16K. Sparse parity solutions
are ~100 lines of numpy — 12K response is more than sufficient.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hydra structured config silently ignores YAML and CLI overrides for
ppo_max_token_len_per_gpu (always resolves to 32768 from base config
interpolation). Force it programmatically after config resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Older omegaconf version doesn't have read_write context manager.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant