--- pretty_name: Deterministic Random Models license: other size_categories: - n<1K tags: - llama - gemma4 - gemma3 - qwen3 - smollm3 - transformers - safetensors - gguf - synthetic - conformance - compatibility-testing --- # Deterministic Random Models This dataset contains eleven small, deterministic language-model fixtures for model-format, loader, inference, compatibility, and conformance testing. They are not trained models and must not be used for language-model quality evaluation. All weights are synthetic and deterministically generated. No original model checkpoint weights are included. ## Cases | Case | Architecture | Parameters | Hugging Face | GGUF | Notable feature | |---|---|---:|---|---|---| | `tinyllama-chat` | Llama | 303,744 | F32 | Q4_K_M | GQA, query/KV ratio 8 | | `smollm2-instruct` | Llama | 46,320 | F32 | Q4_K_M | GQA, query/KV ratio 3 | | `mobilellama-chat` | Llama | 9,296 | F32 | Q4_K_M | MHA | | `minicpm5` | Llama | 1,409,664 | F32 | Q4_K_M | explicit head dimension, multiple EOS IDs | | `deepseek-coder` | Llama | 9,296 | F32 | Q4_K_M | linear RoPE scaling | | `hermes3-llama31` | Llama | 86,336 | F32 | Q4_K_M | Llama 3 RoPE scaling | | `livekit-turn-detector` | Llama | 132,336 | F32 | Q4_K_M | explicit head dimension, GQA | | `gemma4-random-model` | Gemma 4 | 6,036,608 | BF16 | Q4_K | five-local/one-global attention schedule | | `qwen3-random-model` | Qwen 3 | 508,800 | BF16 | Q4_0 | wide Q projection and Q/K head norms | | `smollm3-random-model` | SmolLM3 | 4,917,504 | BF16 | Q4_0 | three-RoPE/one-no-RoPE layer schedule | | `gemma3-random-model` | Gemma 3 | 5,938,176 | BF16 | Q4_K | five-local/one-global attention schedule, EOS 106 | The seven Llama cases are derived from real Hugging Face configuration files by a preservation-first shrinker. Gemma 4, Gemma 3, Qwen 3, and SmolLM3 retain architecture-specific reduced geometries that preserve important ratios, tensor inventories, and layer schedules observed in locally downloaded upstream GGUF models. Published case names use `random-model` rather than `tiny-model` to avoid collision with a separately maintained TinyModel collection. ## Formats and layout The Llama cases retain the original dataset layout: ```text / |-- package/model.safetensors # canonical F32 weights |-- gguf/model-Q4_K_M.gguf |-- tokenizer/ |-- reference/outputs.safetensors |-- inputs.safetensors |-- case.json |-- provenance.json |-- source-config.json |-- shrunk-config.json |-- config-diff.json `-- validation.json ``` The architecture-specific cases use: ```text / |-- hf-bf16/ | |-- config.json | |-- model.safetensors | |-- tokenizer.json | `-- tokenizer_config.json |-- gguf-q4_k/ or gguf-q4_0/ | |-- -Q4_K.gguf or -Q4_0.gguf | `-- quantize.log |-- reference/ | |-- inputs.json | |-- hf-outputs.safetensors | `-- gguf-native.json |-- CONFIG_DECISION.md `-- metadata.json ``` `manifest.json` is the machine-readable index of all eleven model packages and their SHA-256 hashes and sizes. ## Synthetic weights and tokenizers Weights use the `tlfloat::LCG64` recurrence with multiplier `6364136223846793005`, increment `1442695040888963407`, and ten warm-up steps. Each case records its seed and provenance. The reduced models use deterministic 128-token auxiliary vocabularies. These tokenizers cover token IDs `0..127` and preserve each case's special-token semantics, but they do not reproduce the linguistic behavior of the original tokenizer. Explicit token IDs are the primary numerical-test interface. ## GGUF generation and validation GGUF files were generated with upstream `ggml-org/llama.cpp` commit `40b740ad05c531b9d57aca6698c3ed553a9e784c`. Every retained GGUF was loaded through that revision and exercised with direct token IDs for prefill, cached decode, logit extraction, finite-value checks, and repeated-execution checks. The effective EOG token set was checked against the model EOS semantics. Per-case metadata records the actual tensor-type histogram, hashes, commands, and informational comparison with the corresponding Transformers reference. Q4_K, Q4_K_M, and Q4_0 are lossy formats. Their logits are not required to equal the F32 or BF16 reference exactly. ## Reproducibility and scope The Hugging Face weights, configs, and GGUF outputs for Gemma 4, Gemma 3, Qwen 3, and SmolLM3 were independently regenerated and found byte-identical. The Llama cases retain their source revisions, source-config hashes, shrink decisions, and generation provenance in each case directory. This dataset is not a pretrained-model collection, a model-quality benchmark, or a reproduction of upstream weights or tokenizers. Source-derived configuration and metadata files may remain subject to terms of their respective upstream repositories; consult their recorded provenance before redistribution. See `REPORT.md`, `GGUF_Q4_K_M_REPORT.json`, and `ARCHITECTURE_RANDOM_MODELS_REPORT.json` for collection-level summaries. ## History ### 2026-08-12: Gemma 4 random model rebuilt The first `gemma4-random-model` release used hidden width 128, 1,519,168 parameters, and Q4_0. That version was replaced because its small matrix axes did not exercise K-quant blocks and its GGUF metadata was not sufficiently close to the inspected 12B Gemma 4 source GGUF. The current release uses hidden width 256, FFN width 1024, 6,036,608 parameters, and llama.cpp's `Q4_K` alias. Its actual tensor histogram contains F32, Q4_K, and Q6_K, matching the source profile family. It preserves the six-layer five-sliding/one-full schedule, per-layer KV head array, local/global head-width ratio, dual RoPE regimes, global shared K/V behavior, complete norm inventory, layer output scales, tied embeddings, tokenizer special IDs, and applicable sampling metadata. HF BF16 weights and both HF and GGUF references were regenerated; the previous Q4_0 Gemma 4 files are not part of this release.