Upload base_final
Browse filesFiles changed (7)
- README.md+19-20
- assets/loops.png
- model.safetensors+1-1
- onnx/coda.onnx+1-1
- onnx/core.onnx+1-1
- onnx/prelude.onnx+1-1
- onnx/stem.onnx+1-1
25 unmodified lines26272829303132333412 unmodified lines4748495051525311 unmodified lines656667686970717273747576777879808182838485868788899091929338 unmodified lines1321331341351361371384 unmodified lines14314414514614714814915015115215315415515615725 unmodified lines# loopmm base> **Mid-training checkpoint.** These weights come from step 5,000 of 8,869 (5.2B of the 9.3B tokens) of the training run. The final weights will replace them when the run ends, around 10:30 UTC on 23 November 2026.loopmm is a small language model that takes images and text as input. It has 189M parameters. Its 12 middle layers run three times for each token. It was trained from scratch on 9.3B tokens of text and image-text data.This repo holds the pretrained base model. It continues text and writes captions for images, but it does not follow instructions. A chat version will be published later today.12 unmodified lines## Training dataThe model saw 9.3B tokens. About half of them come from text-only documents and half from documents with images. About a quarter of all tokens are image patches. The loss is computed on text tokens only.Text-only data:- Web: [Ultra-FineWeb](https://huggingface.co/datasets/openbmb/Ultra-FineWeb) (English) and [DCLM baseline](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0)11 unmodified lines## Training- 9.3B tokens, 2^20 (about 1M) tokens per step.- Phases. 7.9B tokens at a context of 4,096 with a flat learning rate (after a 1,000-step warmup). Then the learning rate decays to 0 over the last 15% of the tokens: 0.84B tokens at 4k on higher-quality data, 0.42B at 32k and 0.14B at 64k.- Optimizer. Muon for the matrices inside the layers, and AdamW for the embedding, the image stem, the norms, the conv kernels, the AttnRes queries and the gate. Peak learning rate 2e-3, weight decay 0.1, gradient clipping at 1.0, bf16.- Hardware. One node of 8 B200 GPUs on Modal for about 2.5 hours.## ResultsValidation loss at step 5,000 (3 loops): 2.896 on Ultra-FineWeb text. On DOCCI image descriptions it is 2.662 with the image and 2.804 without it, so the model uses the image. Benchmark results will be added here later today.## Loop countThe model was trained with 3 passes through the core, but it can run with any number. The table shows the validation loss at step 5,000 at each loop count. Text is 8,192 tokens of Ultra-FineWeb; captions are 8 DOCCI image descriptions, scored with and without their image.| loops | text | caption | caption, no image ||---|---|---|---|| 1 | 3.439 | 2.915 | 3.051 || 2 | 3.170 | 2.802 | 2.931 || 3 | 2.896 | 2.662 | 2.804 || 4 | 2.953 | 2.695 | 2.837 || 5 | 2.943 | 2.698 | 2.845 || 6 | 2.964 | 2.700 | 2.850 |One pass costs 0.543 in text loss compared with 3. More passes than 3 make it worse (2.953 at 4 loops, 2.964 at 6). In the playground and the Mac app, the Loops slider sets this number.38 unmodified lines`model(input_ids)` returns logits for every position. Generation goes through `complete()` and `generate_from()`, which keep a cache, so each new token costs one step. `transformers`' own `generate()` is not supported. Put token id 1 (`<|startoftext|>`) before your text; `complete()` does this for you.The release code gives the same logits as the training code (largest difference 3e-05 in fp32, at 1, 2, 3, 4 and 6 loops).### ONNX4 unmodified lines- `core.onnx`: layers 6 to 17. Run it once per loop, and keep a separate cache for each loop.- `coda.onnx`: layers 18 to 23 and the output head`onnx/meta.json` lists the inputs of each graph. The `engine.js` file of the Space shows how to call them. The weights are stored in fp16 and computed in fp32, so the ONNX graphs give the same results as PyTorch: on validation text the loss is 3.8118 with ONNX and 3.8118 with PyTorch. The four files take 467 MB. Dynamic int8 quantization was tried first; on some checkpoints it raised the loss by up to 0.17, so it is not used.## Limitations- It is a small model, and it was trained on only 9.3B tokens. Its output often contains false facts and repeats itself.- It is a base model with no instruction tuning and no safety tuning.- Most of the training data is in English.- Its image skills are basic. Its captions name the main content of a photo, but they often get details, counts and text in the image wrong.- The model saw contexts longer than 4k tokens only at the end of training (0.56B tokens at 32k and 64k).## Licenses25 unmodified lines2627282930313212 unmodified lines4546474849505111 unmodified lines63646566676869707172737475767778798081828384858687888990919238 unmodified lines1311321331341351361374 unmodified lines14214314414514614714814915015115215315415515625 unmodified lines# loopmm baseloopmm is a small language model that takes images and text as input. It has 189M parameters. Its 12 middle layers run three times for each token. It was trained from scratch on 8.74B tokens of text and image-text data.This repo holds the pretrained base model. It continues text and writes captions for images, but it does not follow instructions. A chat version will be published later today.12 unmodified lines## Training dataThe model saw 8.74B tokens. About half of them come from text-only documents and half from documents with images. About a quarter of all tokens are image patches. The loss is computed on text tokens only.Text-only data:- Web: [Ultra-FineWeb](https://huggingface.co/datasets/openbmb/Ultra-FineWeb) (English) and [DCLM baseline](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0)11 unmodified lines## Training- 8.74B tokens, 2^20 (about 1M) tokens per step.- Phases. 7.9B tokens at a context of 4,096 with a flat learning rate, after a 1,000-step warmup. Then 0.84B tokens at 4k on higher-quality data, while the learning rate decays from 2e-3 to 4.7e-4.- The plan had two more phases, 0.42B tokens at 32k and 0.14B at 64k, in which the learning rate would reach 0. The run hit its budget limit after a crash at the start of the 32k phase, so these weights are the checkpoint from the end of the 4k phases (step 8,337).- Optimizer. Muon for the matrices inside the layers, and AdamW for the embedding, the image stem, the norms, the conv kernels, the AttnRes queries and the gate. Peak learning rate 2e-3, weight decay 0.1, gradient clipping at 1.0, bf16.- Hardware. One node of 8 B200 GPUs on Modal, for about 2 hours of training.## ResultsValidation loss of the final weights (3 loops): 2.859 on Ultra-FineWeb text. On DOCCI image descriptions it is 2.267 with the image and 2.568 without it, so the model uses the image. Benchmark results will be added here later today.## Loop countThe model was trained with 3 passes through the core, but it can run with any number. The table shows the validation loss of the final weights at each loop count. Text is 8,192 tokens of Ultra-FineWeb; captions are 8 DOCCI image descriptions, scored with and without their image.| loops | text | caption | caption, no image ||---|---|---|---|| 1 | 3.440 | 2.700 | 2.940 || 2 | 3.171 | 2.467 | 2.750 || 3 | 2.859 | 2.267 | 2.568 || 4 | 2.932 | 2.305 | 2.602 || 5 | 2.937 | 2.333 | 2.625 || 6 | 2.984 | 2.348 | 2.635 |One pass costs 0.580 in text loss compared with 3. More passes than 3 make it worse (2.932 at 4 loops, 2.984 at 6). In the playground and the Mac app, the Loops slider sets this number.38 unmodified lines`model(input_ids)` returns logits for every position. Generation goes through `complete()` and `generate_from()`, which keep a cache, so each new token costs one step. `transformers`' own `generate()` is not supported. Put token id 1 (`<|startoftext|>`) before your text; `complete()` does this for you.The release code gives the same logits as the training code (largest difference 1e-04 in fp32, at 1, 2, 3, 4 and 6 loops).### ONNX4 unmodified lines- `core.onnx`: layers 6 to 17. Run it once per loop, and keep a separate cache for each loop.- `coda.onnx`: layers 18 to 23 and the output head`onnx/meta.json` lists the inputs of each graph. The `engine.js` file of the Space shows how to call them. The weights are stored in fp16 and computed in fp32, so the ONNX graphs give the same results as PyTorch: on validation text the loss is 3.7255 with ONNX and 3.7255 with PyTorch. The four files take 467 MB. Dynamic int8 quantization was tried first; on some checkpoints it raised the loss by up to 0.17, so it is not used.## Limitations- It is a small model, and it was trained on only 8.74B tokens. Its output often contains false facts and repeats itself.- It is a base model with no instruction tuning and no safety tuning.- Most of the training data is in English.- Its image skills are basic. Its captions name the main content of a photo, but they often get details, counts and text in the image wrong.- It was trained only on sequences of up to 4,096 tokens. Longer inputs are not tested.## Licenses
123version https://git-lfs.github.com/spec/v1oid sha256:e094ca6d85180d014534cff56263bfd84927009ab1cfffb95338119ee4ae56fcsize 754789964123version https://git-lfs.github.com/spec/v1oid sha256:944a76d9aad2f8964a10c40b7508792c60091559dc7c158dcad061f3ff4cbf2bsize 754789964
123version https://git-lfs.github.com/spec/v1oid sha256:99621f2e8e7c247d2ff0aba54b8d70c4cd97d1d2e461e7fb0dba099f0cff9b47size 156196840123version https://git-lfs.github.com/spec/v1oid sha256:6322c7dc586f2f80b7be59623bfec63e6595826d428267049354126a8a383118size 156196840
123version https://git-lfs.github.com/spec/v1oid sha256:a8b463c6a776dd596d42531d447967a2857b384bd19be4fe8aa5ff2b5ba2d141size 144792550123version https://git-lfs.github.com/spec/v1oid sha256:39a3435e19df286ba3bea49ddc0bf389399096348c30081cd998a6c4da9d2cd7size 144792550
123version https://git-lfs.github.com/spec/v1oid sha256:8e54f2bec501e72f304d3f125bca70369d929c5f72ff9a61022266f8f1125c28size 157345160123version https://git-lfs.github.com/spec/v1oid sha256:b7e268514d398bbe88fd5ab3d3a85da43e88af37710b0b6881771ccf379646dasize 157345160
123version https://git-lfs.github.com/spec/v1oid sha256:546b4a31d6b717b8da30ad049e0a9d54f13f07c050b42607b7a86b99078e821asize 8865118123version https://git-lfs.github.com/spec/v1oid sha256:237404eebd7882f29162af941272b465e55a58ef702492d78ffef218de3fc754size 8865118
README.md+19-20
assets/loops.png


model.safetensors+1-1
onnx/coda.onnx+1-1
onnx/core.onnx+1-1
onnx/prelude.onnx+1-1
onnx/stem.onnx+1-1