Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions docs/deployment-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Native slots support dense projections, the output head and grouped expert proje

### Images

`trainer_image` and `inference_image` select the trainer and sampler images. Each takes a built-in name or a `module:attribute` path to a `modal.Image`. The names are listed in [deployment_apps.py](../src/spindle/providers/modal/deployment_apps.py): `miles-v0.1.1-52a7a99`, `miles-v0.1.2-99e1ebe`, `miles-v0.1.2-99e1ebe-glm53`, `miles-v0.2.0-8c5de26`, `miles-v0.2.0-e814245` and `megatron-2d1fa8d` for trainers, and `sglang-v0.5.21-a3e0e17`, `sglang-v0.5.23-c4182b2`, `sglang-v0.5.23-c4182b2-glm53` and `sglang-v0.5.23-e003cf9` for samplers. A name is the upstream release followed by the short commit of the Spindle fork that the image installs. A suffix such as `-glm53` marks extra model-specific build steps. The Megatron image has no release, so its name has only the Megatron-LM commit. `miles-v0.1.1-52a7a99`, `miles-v0.1.2-99e1ebe`, `miles-v0.1.2-99e1ebe-glm53` and `miles-v0.2.0-8c5de26` support seeded LoRA initialization (`create_lora_training_client(seed=...)`), and `miles-v0.2.0-8c5de26` also adds Beam LoRA support. Use a `module:attribute` path for an image you define in your own code.
`trainer_image` and `inference_image` select the trainer and sampler images. Each takes a built-in name or a `module:attribute` path to a `modal.Image`. The names are listed in [deployment_apps.py](../src/spindle/providers/modal/deployment_apps.py): `miles-v0.1.1-52a7a99`, `miles-v0.1.2-99e1ebe`, `miles-v0.1.2-99e1ebe-glm53`, `miles-v0.2.0-8c5de26`, `miles-v0.2.0-e814245` and `megatron-2d1fa8d` for trainers, and `sglang-v0.5.21-a3e0e17`, `sglang-v0.5.23-c4182b2`, `sglang-v0.5.23-c4182b2-glm53` and `sglang-v0.5.23-e003cf9` for samplers. A name is the upstream release followed by the short commit of the Spindle fork that the image installs. A suffix such as `-glm53` marks extra model-specific build steps. The Megatron image has no release, so its name has only the Megatron-LM commit. `miles-v0.1.1-52a7a99`, `miles-v0.1.2-99e1ebe`, `miles-v0.1.2-99e1ebe-glm53` and `miles-v0.2.0-8c5de26` support seeded LoRA initialization (`create_lora_training_client(seed=...)`), and `miles-v0.2.0-8c5de26` also adds Beam LoRA support. `miles-v0.1.1-fdd808c`, `miles-v0.1.2-f2f8447` (DeepSeek-V4.1) and `miles-v0.1.2-464efc9-glm53` (GLM-5.3 Flash) are the images Spindle 0.1.7 and earlier trained on. No bundled config uses them; set one as `trainer_image` to restore a training state saved on it, because a checkpoint restores only on the Miles revision that saved it. Use a `module:attribute` path for an image you define in your own code.

Every bundled config sets both images itself rather than inheriting them, so upgrading SGLang or Miles for one config doesn't change any other. If you leave a field empty in your own config, it uses the backend default (`miles-v0.1.1-52a7a99`, `megatron-2d1fa8d` or `sglang-v0.5.23-c4182b2`), and that default can change in a later Spindle release. Set both fields to keep a config on the images it was tested with.

Expand All @@ -204,7 +204,7 @@ To change an image:
2. Move configs to the new name one at a time. Record a reference run for each config you move.
3. Once no bundled config, default or reference run uses the old name, remove it and the module that builds it.

`miles-v0.2.0-15afe21` supports single-node dense native adapters; `miles-v0.2.0-e814245` also supports routed expert adapters and Nemotron-3 Nano. On the built-in v0.2.0 images, use `raw` with `canonical_lora` or `bridge` with `lora`. Spindle rejects Bridge with `canonical_lora`, which has not been validated here. The older Miles images support the fused `lora` layout.
`miles-v0.2.0-8c5de26` supports single-node dense native adapters; `miles-v0.2.0-e814245` also supports routed expert adapters and Nemotron-3 Nano. On the built-in v0.2.0 images, use `raw` with `canonical_lora` or `bridge` with `lora`. Spindle rejects Bridge with `canonical_lora`, which has not been validated here. The older Miles images support the fused `lora` layout.

A checkpoint restores only on a trainer with the same Miles revision and adapter layout as the one that saved it. Checkpoints without a recorded layout are treated as `lora`. Keep the original image and layout to restore older checkpoints after switching a recipe to native canonical adapters.

Expand Down
6 changes: 6 additions & 0 deletions src/spindle/providers/modal/deployment_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@
# Named images are frozen: add a new name instead of editing one. See docs/deployment-configs.md#images.
# Each entry notes the fork PR that last changed its commit.
TRAINER_IMAGES = {
# https://github.com/modal-projects/miles/pull/16 Support Tinker SDK 0.29+ in Miles' Tinker layer
"miles-v0.1.1-fdd808c": miles_v011_image.image_01_fdd808c,
# https://github.com/modal-projects/miles/pull/42 Support per-adapter seeds in the v0.1.1 LoRA slot API
"miles-v0.1.1-52a7a99": miles_v011_image.image_02_52a7a99,
# https://github.com/modal-projects/miles/pull/30 Prefetch the DeepSeek-V4.1 Engram tables at load
"miles-v0.1.2-f2f8447": miles_v012_image.image_01_f2f8447,
# https://github.com/modal-projects/miles/pull/43 Support per-adapter seeds in the v0.1.2 LoRA slot API (on top of #31)
"miles-v0.1.2-99e1ebe": miles_v012_image.image_02_99e1ebe,
# https://github.com/modal-projects/miles/pull/31 Support GLM-5.3 with a pinned provider dependency
"miles-v0.1.2-464efc9-glm53": miles_v012_image.glm53_image_01_464efc9,
# https://github.com/modal-projects/miles/pull/43 Support per-adapter seeds in the v0.1.2 LoRA slot API
"miles-v0.1.2-99e1ebe-glm53": miles_v012_image.glm53_image_02_99e1ebe,
# https://github.com/modal-projects/miles/pull/44 Support per-adapter seeds in the v0.2.0 LoRA slot API (on top of #37, Beam LoRA)
Expand Down
1 change: 1 addition & 0 deletions src/spindle/providers/modal/miles_v011_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,6 @@ def image_at(miles_commit: str) -> modal.Image:


# Fork commits in ancestry order, each a descendant of the one before. Append new commits; never edit an entry.
image_01_fdd808c = image_at("fdd808c008175d4895fd8c57c95ef4fa5bb6a2a0")
# Merged modal-projects/miles#42: per-adapter seeds through load_slot.
image_02_52a7a99 = image_at("52a7a99d9f9e6188ece91a0583ef417093601025")
3 changes: 3 additions & 0 deletions src/spindle/providers/modal/miles_v012_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ def glm53_image_at(miles_commit: str) -> modal.Image:


# Each series lists fork commits in ancestry order, each a descendant of the one before. Append new commits; never edit an entry.
image_01_f2f8447 = image_at("f2f8447c33ac0755a0988c30d413d334dea0a26a")
# Branch head: the GLM-5.3 provider hooks, inert without the glm53 build steps, and per-adapter seeds through load_slot.
image_02_99e1ebe = image_at("99e1ebe8e86974e0b3c290f47f415ee47726f965")

# Merged modal-projects/miles#31 on spindle-miles-v0.1.2.
glm53_image_01_464efc9 = glm53_image_at("464efc9781bbf8edf2135f0857f5aa417685eae2")
# Merged modal-projects/miles#43: per-adapter seeds through load_slot.
glm53_image_02_99e1ebe = glm53_image_at("99e1ebe8e86974e0b3c290f47f415ee47726f965")
4 changes: 4 additions & 0 deletions tests/providers/test_deployment_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ def test_bundled_configs_pin_their_own_images(path, monkeypatch):

UNUSED_IMAGE_WHITELIST = {
"miles-v0.2.0-8c5de26", # Beam LoRA support is awaiting a bundled config.
# Restore Miles LoRA checkpoints saved by Spindle 0.1.7 and earlier.
"miles-v0.1.1-fdd808c",
"miles-v0.1.2-f2f8447",
"miles-v0.1.2-464efc9-glm53",
}


Expand Down
Loading