Repository navigation
Validate DPO on Qwen3.5-9B-Base LoRA - #21
Merged
Merged
Conversation
Runs the tinker-cookbook DPO recipe (forward_backward_custom + compute_logprobs reference) against a Spindle deployment and compares the final step with the cookbook README's Tinker numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spindle deploy imports spindle.inference.sampling locally, and macOS has no socket.TCP_KEEPIDLE, so the frontend deploy failed with AttributeError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Tinker SDK rejects API keys without the tml- prefix, so keys generated with the previous command fail at ServiceClient creation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spindle works as a drop-in Tinker backend URL, so the validation uses the cookbook's DPO recipe directly instead of a wrapper script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Versions used for the DPO validation run in
The docs show the plain cookbook command, which works once Spindle supports tinker 0.30. Until then, run it with: uv run --python 3.12 --with "tinker>=0.24,<0.25" \
--with "tinker-cookbook @ git+https://github.com/thinking-machines-lab/tinker-cookbook.git@c8ed9c764b59161391156f980102d82f05014765" \
python -m tinker_cookbook.recipes.preference.dpo.train \
base_url=$TINKER_BASE_URL model_name=Qwen/Qwen3.5-9B-Base dataset=hhh \
renderer_name=role_colon learning_rate=1e-4 dpo_beta=0.1 max_steps=10 \
log_path=/tmp/dpo-hhh-experiment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DPO works on Spindle today through the Tinker SDK's
forward_backward_custom, using the existingqwen35-9b-lora-16kdeployment. No new deployment config or wrapper is needed: the stock tinker-cookbook DPO recipe runs unchanged withbase_urlpointed at a Spindle server.Validation. The cookbook DPO recipe covers reference-sampler publication,
compute_logprobs,forward_backward_custom, andoptim_step. With the cookbook settings (HHH, Qwen3.5-9B-Base, rank 32, β 0.1, batch 256) at lr 1e-4 for 10 steps:The command and results are in
docs/lora_validation.md, and the run is on W&B.Fixes found while deploying from scratch:
spindle deployfailed on macOS becausesocket.TCP_KEEPIDLEdoesn't exist there. It now falls back toTCP_KEEPALIVE, the macOS name for the same option.tml-prefix, which the Tinker SDK rejects. It now generatestml-keys.Testing:
pytest tests/inferencepasses on macOS.qwen35-9b-lora-16kdeployment with tinker 0.24.1.🤖 Generated with Claude Code