r/huggingface • • 10h ago

Models that carry their units, so a rerun cannot silently mean something else

0 Upvotes

A model checkpoint reproduces a function, not the model. The units, the parameter ranges and the reason a term exists all live in whoever wrote the code, and six months later that context is gone. I have watched a simulation get rerun with a rate in the wrong time base and produce a curve that looked plausible enough to publish.

axiomize is the modeling layer I built around that gap. A model is declared with mandatory units on every parameter and variable, kept in a versioned Model IR, and validated before any numbers come out. Because the checks run on canonical unit scales and not only dimension exponents, a rate declared 1/s while the independent variable is in day fails instead of quietly producing a value 86,400 times off.

The failure is loud by construction. Simulation routes through the same validation as axiomize model --action validate, and a mismatch raises ModelDimensionMismatch with the failing checks instead of returning an array. There is also an audit for the quiet version of the problem: unit_declaration_audit lists every symbol that would default to dimensionless, which is usually where an unlabeled constant is hiding.

What leaves the tool is the part that survives a move between machines. Models export to canonical JSON, Python, YAML, notebooks, SBML Level 3, CellML 2.0, Modelica, GraphML, Graphviz DOT and a SHA-256 portable bundle, and values with units round-trip bit-exactly, asserted in the test suite rather than stated in prose. A run ledger keeps the provenance, so a stored result can be checked before someone reuses it, and axiomize-to-latex turns a standardized report into LaTeX if the output has to become a document.

There are sixteen actions under axiomize model for the lifecycle, including plan, validate, simulate, fit, compare, repair, numerical-verify and export. Numerical verification compares against closed-form theory and separates numerical error from stochastic variability before it claims convergence, which is the only part of the pipeline that can honestly be called verification.

Install is pip install axiomize, or npm install -g axiomize. What it does not do: it does not make a bad model good, it makes a bad model fail loudly, and dimensional checking catches unit errors rather than physics errors. Bayesian sampling needs the full extra with PyMC and JAX, FEM needs FEniCS, and both are reported as unavailable instead of being silently substituted. The worked examples use illustrative parameter ranges, not literature-backed ones. MIT, 1.15.0: https://github.com/Furox-Art/axiomize


r/huggingface • • 13h ago

I squeezed Ming-Image 0.2 Design (24.9B, #1 open-weight) onto a 16 GB Mac β€” side-by-side vs the 80 GB CUDA reference (free MLX Q4/Q8 weights inside)

Thumbnail gallery
1 Upvotes

r/huggingface • • 21h ago

I built a Windows app that lets you tick which Hugging Face models to download

2 Upvotes

I wanted to back up models to an external drive, so I built a little Windows app for it. The catalogue has 75 Hugging Face models. Tick the ones you want, pick a folder, and click Check space to see how much room your selection needs.

Click Download selected to start. You can pause and resume the queue, and the app verifies each model when it finishes. It runs on 64-bit Windows without installing Python.

The Windows download, source code and full model list are on GitHub.

https://github.com/skidneydudz/model-archive-downloader

If there’s a model you’d like to see added, let me know.


r/huggingface • • 3h ago

πŸ‘‹ Welcome to r/Tensormorph - Introduce Yourself and Read First!

Post image
3 Upvotes

I'm building Tensormorph, a visual IDE for inspecting open-weight models from the Hub down to individual weights

Tensormorph Logo

Hi r/huggingface! I'm building Tensormorph, a desktop Tensor IDE for exploring, inspecting, comparing, and debugging open-weight models.

The problem: we download models from the Hub all the time, but the weights themselves are a black box. A Safetensors or GGUF file is millions or billions of numbers with very few ways to actually look at them.

What Tensormorph does: you start from a model's full architecture and drill down through layers, modules, tensors, matrix tiles, and individual scalar values. Along the way you get:

- Interactive heatmaps of weight tensors

- Per-tensor statistics and distributions

- Side-by-side comparison of a base model and its fine-tunes

- Quantization analysis (where a quantized model drifts from the original)

- Inspection that scales to large models

TEL (Tensor Expression Language): Tensormorph also includes a short, math-like language for tensor operations. You write it the way it looks in a paper, with named axes, and it maps directly to the tensors and graph nodes in the model:

scores[B,H,T,S] = q[B,H,T,D] @ k[B,H,S,D] / sqrt(D)
out[B,H,T,D]    = softmax(scores, axis=S) @ v[B,H,S,D]

(early sketch, syntax still evolving)

Select a term in the formula and you see the matching tensor, or the other way around.

I'd love your input:

  1. Which Hub models would you want to inspect first?
  2. Do you compare fine-tunes against their base model today? How?
  3. What would you want to see when checking a quantized model (GGUF, GPTQ, AWQ)?

It's still early. Happy to answer questions about how it works.


r/huggingface • • 47m ago

I built a drop-in replacement for AutoTokenizer that's 474×–11,842Γ— faster than HuggingFace tokenizers (same exact token IDs)

Post image
2 Upvotes

Hey everyone!

I built tuetoken, a fast Rust BPE tokenizer that works as a drop-in replacement for transformers.AutoTokenizer. You just swap one import line, load any model's tokenizer.json straight from the HuggingFace Hub, and get 100% bit-for-bit identical token IDs (including chat templates, special tokens, padding, left/right truncation, and Whisper timestamps).

Install: pip install tuetoken (MIT license)
GitHub: https://github.com/tuetoken-org/tuetoken

How fast is it vs HuggingFace tokenizers / transformers?

All tested on Apple M4 Max (14 cores) and verified on Linux (AMD Zen 4), with token IDs checked identical before timing:

  • 1 GB text corpus (cold start): 4.50 GB/s vs 9.5 MB/s (474Γ— faster, and 71Γ— faster than tiktoken, 2.5Γ— faster than gigatoken)
  • Popular HF models (25 MB):
    • Llama-4-Scout: 9.00 GB/s vs 20 MB/s (446Γ— faster)
    • Qwen3-8B: 6.77 GB/s vs 7.3 MB/s (927Γ— faster)
    • Gemma-3-4B: 5.07 GB/s vs 55 MB/s (93Γ— faster)
    • DeepSeek-V3: 3.77 GB/s vs 9.2 MB/s (410Γ— faster)
  • Loading tokenizer.json: 7–20 ms vs 84–348 ms (12–29Γ— faster startup)
  • Truncating long docs (50 MB, max_length=512, right & left): 1.3–2.8 ms vs 10.6+ seconds (4,381Γ— to 11,842Γ— faster β€” it stops early once it has enough tokens instead of tokenizing the whole document first!)
  • Whisper (whisper-large-v3): decode_with_timestamps batch is 323Γ— faster (0.098 ms vs 31.7 ms)
  • Byte offsets (1 MB): 215Γ— faster (1.16 ms vs 249 ms)

How to use it

from tuetoken import AutoTokenizer

tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B")
out = tok(texts, truncation=True, max_length=512, padding=True, return_tensors="np")

It loves the HuggingFace tokenizer.json ecosystem β€” no custom files or conversions needed. The full benchmark script (tools/bench/bench_vs_all.py) and raw numbers are in the repo so you can run it on your own machine.

If you try it on a model from the Hub and hit any edge case where a single token ID differs from transformers, please open an issue β€” happy to fix it fast!


r/huggingface • • 19h ago

EU LLMs as a service, beyond Mistral?

Thumbnail
reddit.com
2 Upvotes

r/huggingface • • 20h ago

Inkling-2-Mini-Unbound v3: no more thinking loops (debugging 73.3% β†’ 100%, answers 3x faster), plus Inkling-2-Mini-Prime, the same fix for the original censored model

Thumbnail
reddit.com
2 Upvotes