What is Models.dev
Models.dev is an AI model database open-sourced by the OpenCode team. Models.dev integrates model information from dozens of mainstream vendors such as OpenAI, Anthropic, and Google in a standardized TOML format, covering key specifications such as pricing, context window, tool calling, and knowledge cutoff, and provides a public JSON API (models.dev/api.json) for developers to call directly. Models.dev solves the pain point of fragmented AI model information, helping developers query in one place and estimate costs accurately, and complete model selection efficiently.
Main features of Models.dev
-
One-stop model information query: includes basic conversational models and specialized domain models from dozens of mainstream vendors such as OpenAI, Anthropic, Google, and Meta, with no need to switch between multiple official websites.
-
Accurate cost estimation: records in detail each model's input/output/reasoning/cache read/cache write costs (USD per million tokens), as well as audio input and output costs, helping projects estimate budgets accurately.
-
Capability specification comparison: standardizes the display of whether a model supports tool calling, reasoning/chain-of-thought, structured output, temperature control, and file attachments, as well as key indicators such as knowledge cutoff date, context window, maximum input and output token counts, and supported modalities.
-
Public JSON API: provides the
models.dev/api.jsoninterface, and developers can directly call complete model data in their projects to build model selection tools, cost calculators, or management panels. -
Provider logo retrieval: through the
models.dev/logos/{provider}.svginterface, directly retrieve logos for each vendor. -
Community collaborative maintenance: data is stored in TOML format categorized by provider, supports community contributions, and ensures the database is continuously updated.
Technical principles of Models.dev
-
Three-stage recurrent architecture: after the input is encoded by the Prelude (standard Transformer layers), it enters the Recurrent Block for T iterations, and finally is output by the Coda; each cycle injects the original input e to prevent hidden state drift.
-
Implicit chain-of-thought: each cycle is equivalent to one step of Chain-of-Thought reasoning, but runs silently in a continuous latent space without outputting intermediate tokens; supports encoding multiple reasoning paths simultaneously.
-
LTI stability constraint: treats the recurrence as a linear time-invariant system, parameterizes A as a negative diagonal matrix and discretizes it, strictly ensuring the spectral radius ρ(A)<1, fundamentally solving residual explosion and training divergence.
-
MoE + recurrent synergy: MoE provides cross-domain breadth, while the recurrent mechanism provides reasoning depth; as the hidden state evolves during recurrence, the router may select different expert subsets, making each cycle's computation unique.
-
Adaptive stopping: supports the ACT (Adaptive Computation Time) mechanism, allowing the model to dynamically decide when to stop recurring to avoid "overthinking".
How to use Models.dev
-
Install:
pip install open-mythos, optionally[flash]enable Flash Attention 2. -
Configure: select
mlaorgqaattention type, and useMythosConfigto set parameters such as dimensions, number of heads, and number of loops. -
Create model:
OpenMythos(cfg)initialize the network. -
Inference generation: call
model.generate(max_new_tokens=8, n_loops=8), vian_loopscontrol the reasoning depth. -
Training: use the
training/3b_fine_web_edu.pyscript; run directly on a single GPU or on multiple GPUs viatorchrunto launch.
Key information and usage requirements of Models.dev
-
Environment: Python + PyTorch; Flash Attention 2 requires CUDA and a compilation toolchain.
-
Tokenizer: use the
openai/gpt-oss-20btokenizer. -
Precision: H100/A100 recommend bfloat16; older GPUs use float16 + GradScaler.
-
Training configuration: AdamW optimizer, linear warmup for 2000 steps followed by cosine decay, targeting about 30B tokens.
-
Scale coverage: predefined parameters are available from a 1B experimental model to a 1T theoretical configuration.
Core advantages of Models.dev
-
Parameter-efficient: cycling k layers L times is equivalent to a fixed-depth network of kL layers, while the parameter count is only at the scale of k layers, and memory does not grow with inference depth.
-
Scalable inference: increasing the number of cycles at test time improves reasoning ability, following a predictable saturating exponential decay pattern.
-
Stable training: the LTI constraint mechanism completely solves the problems of unstable training and loss spikes in recurrent models.
-
Systematic generalization: performs excellently on out-of-distribution (OOD) compositional reasoning, achieving capability leaps through an "epiphany"-style three-stage process.
-
Depth extrapolation: trained on a 5-step reasoning chain, it can successfully extend to 10 steps at test time, whereas a vanilla Transformer fails.
Project addresses of Models.dev
- Project website:https://models.dev/
- GitHub repository:https://github.com/anomalyco/models.dev
Comparison of Models.dev with similar competitors
| Dimension | OpenMythos | DeepSeek-V3 | Qwen2.5 |
|---|---|---|---|
| Core architecture | Recurrent Depth Transformer (RDT) | MoE Transformer | Dense / MoE Transformer |
| Attention mechanism | MLA / GQA switchable | MLA | GQA |
| Recurrent inference | Core feature (latent-space implicit CoT) | None | None |
| Degree of open source | Fully open source (code + training scripts + documentation) | Open-source weights | Open-source weights |
| Model scale | 1B – 1T preconfigured | 671B (total parameters) | 0.5B – 72B, etc. |
| Product positioning | Research validation / theoretical replication | Production-grade general-purpose model | Production-grade general-purpose model |
| Inference scaling | Increase the number of cycles to scale depth | Fixed number of layers | Fixed number of layers |
Application scenarios of Models.dev
-
AI architecture research: validate theories of recurrent Transformers, implicit reasoning chains, and test-time compute scaling.
-
Attention mechanism experiments: compare the KV cache efficiency and inference quality of MLA and GQA under a recurrent architecture.
-
MoE research: test the impact of combining sparse expert routing with recurrent depth on multi-domain tasks.
-
Model training: train custom-scale models from scratch on datasets such as FineWeb-Edu based on the open-source code and scripts.
-
Stability study: verify the practical effectiveness of techniques such as LTI constraints, spectral radius control, and continuous-depth batch processing.