--- title: Baguettotron vs Luth models emoji: πŸ¦€ colorFrom: pink colorTo: gray sdk: gradio sdk_version: 6.6.0 app_file: app.py pinned: true license: mit short_description: fully subsidized versus non-subsidized fr understanding --- # Baguettotron vs Luth models Apples-to-apples comparison of **Baguettotron** (PleIAs, 321M) and **5 Luth models** (kurakurai, 0.4B–1.7B) from the [Luth Models collection](https://huggingface.co/collections/kurakurai/luth-models). ## Features - **All models, all outputs:** Each prompt runs through all 6 models; outputs appear in tabs grouped by parameter size. - **System prompt:** Optional system prompt supported for both Baguettotron (Qwen-style) and Luth (chat template) model families. - **Ultimate footprint:** Per-model disk size and VRAM estimates; combined footprint for all models. A **GGUF & LEAP bundle** reference table lists PleIAs Baguettotron GGUF variants and Liquid LFM2 GGUF sizes (from [LEAP](https://leap.liquid.ai/models) / [PleIAs/Baguettotron-GGUF](https://huggingface.co/PleIAs/Baguettotron-GGUF)). - **Per-family generation settings:** Two columns (Baguettotron | Luth) with sensible defaults: Baguettotron tuned for reasoning (e.g. temp 0.5, 512 tokens); Luth for instruct (e.g. temp 0.7, repeat_penalty 1.05). - **Transformers-only:** No quantization; all models run in BF16/FP16. ## Size tiers | Tier | Models | |------|--------| | ~0.3–0.4B (Small) | Baguettotron, Luth-LFM2-350M | | ~0.6–0.7B (Medium) | Luth-0.6B-Instruct, Luth-LFM2-700M | | ~1–2B (Large) | Luth-LFM2-1.2B, Luth-1.7B-Instruct | ## Luth Qwen3 load report (lm_head β€œMISSING”) For **Luth-0.6B-Instruct** and **Luth-1.7B-Instruct** (Qwen3-based), the loader may report `lm_head.weight | MISSING`. This is expected: their `config.json` has `"tie_word_embeddings": true`, so the output head is tied to the embedding layer and not stored separately in the checkpoint. The model runs correctly. ## Baguettotron EOS quirk Baguettotron's tokenizer uses `"<|im_end>"` (no trailing pipe) for EOS. The app uses manual prompt formatting and stop sequences to avoid multi-token tokenization. See [quirk.md](quirk.md) for details. ## Bundling Luth models (LEAP) The script `bundle_luth.py` downloads a Luth model, validates it for LEAP, creates a GGUF bundle on the device, and investigates the result (sizes, optional inference). ```bash pip install -r requirements-bundle.txt leap-bundle login # from https://leap.liquid.ai/profile#/api-keys # Single model: python bundle_luth.py --model kurakurai/Luth-LFM2-350M # All 5 Luth models (download β†’ validate β†’ create β†’ download GGUF β†’ investigate): python bundle_luth.py --all ``` Options: `--all` (every Luth model in sequence; LEAP free tier = 5 requests/24h), `--work-dir`, `--quantization` (e.g. Q4_K_M, Q8_0), `--dry-run` (download + validate only, no create), `--skip-create`, `--request-id ` to download an existing bundle. **Download and inspect bundles:** Use `download_bundles.py` to fetch completed bundle outputs by request ID. Per Liquid AI docs, artifacts are `.gguf` (default) or `.bundle` (ExecuTorch). The script inspects both and can run a short inference on `.gguf`: ```bash python download_bundles.py --list # list requests, download all completed python download_bundles.py --request-ids 1 2 # download specific IDs python download_bundles.py --inspect-only --infer # inspect existing downloads and run inference ``` ## Deployment - **Hugging Face Spaces:** Set hardware to **Zero GPU** (or standard GPU). Decorate GPU-dependent functions with `@spaces.GPU` per [Spaces ZeroGPU docs](https://huggingface.co/docs/hub/spaces-zerogpu). - **Local:** Run `python app.py`; requires a GPU with ~10 GB VRAM for all 6 models.