From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject:

STELLAR

Date: 2026-11-15Commit: 7db838fSigned: 2DC28CC7B26A283B ✓

Image feature extraction model. Safetensors weights, 5.50 GB in all. Published by microsoft under MIT.

vision5.50GBSTELLARsafetensorspermissive
FactsParamsnot statedSize5.50 GBFormatssafetensorsTaskimage feature extractionLicenseMITFrom sourcepermissive
$ fw get microsoft/STELLAR
# manifest sha256 112dedf7ce8d… · 5.50 GB · 13 files
$ fw verify ./STELLAR microsoft/STELLAR
From sourceHosted (signed)microsoft/STELLARLast check: 2026-11-15 04:12 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
5.50 GB
Weights
5.50 GB (safetensors)
Parameters
not stated
Formats
safetensors
Task
image feature extraction
License
MIT (permissive)
Files
13, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:12 UTCpassed

Model card

From the publisher at commit 7db838f. Shown as plain text with links; images open at the publisher.

STELLAR: Learning Sparse Visual Representations via Spatial–Semantic Factorization#

How many tokens are needed for one image?

We show that with a spatial–semantic factorized representation, 16 semantic tokens paired with explicit spatial maps are enough for strong image recognition and reconstruction. STELLAR separates what an image contains from where it appears, representing the image as the low-rank product of a localization matrix and a semantics matrix.

STELLAR-H achieves 2.60 reconstruction FID and 79.10% ImageNet linear-probing accuracy, using approximately 90% fewer latent values than a dense grid when counting both factors.

Image: Spatial–semantic factorization

These checkpoints contain the full set of trained STELLAR modules (encoder, sparse tokens, projections, reconstruction decoder, and clustering heads), so a single file supports feature extraction, image reconstruction, and continued pretraining. All models are self-supervised on ImageNet-1K at 224×224.

The headline results use the evaluation protocols in our ICML work. Reconstruction FID is not generation FID; loading a checkpoint or running a new probe does not automatically reproduce those numbers. The released files contain pretraining weights, not the separately finetuned B/L reconstruction probes.

Available models#

ModelBackboneSemantic tokensFeature widthTypeWeights
stellar-b16ViT-B/1616768mainsafetensors
stellar-l16ViT-L/16161024mainsafetensors
stellar-h16ViT-H/14161280mainsafetensors
stellar-b8ViT-B/168768ablationsafetensors
stellar-b24ViT-B/1624768ablationsafetensors

Start with B16 for a smaller backbone; use L16 or H16 when memory permits. The B8 and B24 variants study the number of sparse tokens. The token count in the model name is independent of the backbone patch size: H16 uses a ViT-H/14 encoder.

Usage#

Use Python 3.10 and run from the GitHub code directory:

git clone https://github.com/microsoft/STELLAR.git
cd STELLAR
python -m pip install -r requirements-inference.txt

Feature extraction needs no Azure account, Olympus trainer, VQGAN weights, or separate MAE download. This is a custom PyTorch model; use the repository loader, not transformers.AutoModel or pipeline().

Quick start#

The GitHub loader downloads and validates the required weights. Replace your_image.jpg with a local image:

import torch
from load_stellar import load_stellar
from examples.common import read_image

revision = "6794be9a20fb9d3944c5bcc6003512a347fa518f"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = load_stellar("stellar-b16", revision=revision, device=device)
image = read_image("your_image.jpg").unsqueeze(0).to(device)
with torch.no_grad():
    out = model.encode(image)

print(out["sparse"].shape)
print(out["spatial"].shape)

For B16, these shapes are (1, 16, 768) and (1, 196, 16). The helper converts to RGB, resizes the short side to 256 and center-crops to 224. Inputs must be floating-point RGB tensors in [0, 1]; do not apply ImageNet normalization, which is already performed inside the model.

Pin the Hub revision for repeatable downloads. After caching the weights, local_files_only=True enables offline loading. Set HF_HUB_CACHE before starting Python to choose a cache directory. Allow roughly 0.5 GB per B checkpoint, 1.4 GB for L16, and 2.7 GB for H16, plus the tokenizer if reconstructing.

Reconstruction#

Continuing from the quick start, download the external MaskGIT-VQGAN tokenizer and load the decoder:

from huggingface_hub import hf_hub_download
from torchvision.transforms.functional import to_pil_image

vq_path = hf_hub_download(
  "fun-research/TiTok",
  "maskgit-vqgan-imagenet-f16-256.bin",
  revision="ab646ed225080a3acb7c78440a574d7f67f16fa7",
)
model = load_stellar(
  "stellar-b16", purpose="reconstruct", vq_model=vq_path,
  revision=revision, device=device,
)
with torch.no_grad():
  features = model.encode(image)
  reconstruction = model.reconstruct(features)
pixels = reconstruction["reconstruction"]
to_pil_image(pixels[0].cpu()).save("reconstruction.png")

reconstruct takes features, not an image. You can also pass model.reconstruct(features["sparse"], features["spatial"]). Both factors are needed: semantic tokens alone do not specify spatial layout. B/L return RGB 224x224 pixels; H returns 256x256 pixels. Outputs are in [0, 1], with VQ token IDs in reconstruction["tokens"] and logits in reconstruction["logits"]. VQ decoding uses argmax and a frozen tokenizer, so this is not a differentiable RGB decoder for end-to-end pixel losses.

What the model returns#
KeyShapeDescriptionTypical use
sparse(B, K, D)sparse concept tokensclassification, retrieval
spatial(B, P, K)spatial map of each tokensegmentation, visualization
dense(B, P, D)dense per-patch featuressegmentation
lowrank(B, P, D)reassembled dense mapreconstruction
cls(B, 1, D)global representationclassification

B = batch, K = number of sparse tokens, P = number of patches (196 for /16 at 224², 256 for /14), D = embedding dim (768 / 1024 / 1280 for B / L / H).

Training and evaluation#

The GitHub repository provides image-folder training, checkpoint resume, and classification, segmentation and reconstruction probes. Install the training dependencies and prepare your data using the usage guide.

GoalConfiguration or command
Pretrain on ImageNet or custom imagesconfigs/stellar.yaml
Train a classification probeconfigs/eval_cls.yaml
Train a segmentation probeconfigs/eval_seg.yaml
Train a reconstruction probeconfigs/eval_recon.yaml
Measure released-decoder rFID/LPIPSReconstruction metrics

See the configuration guide for data paths, batch size, devices, learning rate and model settings. Evaluation recipes train new heads on frozen features; testing requires a trained head checkpoint. The default pretraining recipe starts from MAE, not these Hub weights.

For a custom continued-pretraining loop, load_stellar(..., purpose="pretrain", vq_model=...) loads all trained modules in train mode. Supply the multi-crop batch contract described in the usage guide. This is weights-only initialization, not an optimizer resume; use a full Lightning checkpoint with scratch.resume to resume an interrupted training run.

Model details#

  • Architecture: ViT encoder (MAE-initialized) + learned sparse latent queries with spatial–semantic factorization.
  • Pretraining data: ImageNet-1K (self-supervised; labels not used).
  • Input: RGB images in [0, 1] at 224x224. ImageNet mean/std normalization is applied inside the model — pass raw [0, 1] images.
  • Weights: the complete set of trained STELLAR modules (encoder, sparse tokens, projections, reconstruction decoder, and clustering heads), stored in safetensors. Only the third-party MaskGIT-VQGAN tokenizer is excluded — it is downloaded separately (from TiTok) and passed via vq_model.
  • Framework: PyTorch.

Intended uses & limitations#

  • Supported research uses: compact visual features for recognition, segmentation, reconstruction, retrieval experiments and representation analysis.
  • Compression is not encoder acceleration: the ViT still processes dense patches. Fewer output latent values do not imply a 90% encoder or VLM speedup.
  • Tokens are learned concepts: they are not guaranteed objects, class IDs, temporal identities or pretrained language-aligned embeddings.
  • Domain shift: ImageNet-pretrained features may require adaptation and held-out evaluation on medical, satellite or other substantially different data.
  • Deployment: these are research artifacts, not safety-tested models for production decision-making.
Connections to VLMs and latent generation#

Sparse semantic tokens provide a compact input to a learned language-model adapter. Appendix B.3 evaluates alignment to a CLIP text tower using a trained probe; no pretrained VLM adapter or captioning system is released.

The paired semantic and spatial factors may also be studied as latents for representation autoencoders (RAEs) or latent diffusion. We have not evaluated RAE-style generation and make no generation-quality claims. Reconstruction results do not establish unconditional or text-to-image generation performance.

Citation#

@inproceedings{zhao2026stellar,
  title     = {Learning Sparse Visual Representations via Spatial-Semantic Factorization},
  author    = {Zhao, Theodore Zhengde and Kiblawi, Sid and Yang, Jianwei and Usuyama, Naoto and Tan, Reuben and Codella, Noel C and Naumann, Tristan and Poon, Hoifung and Wei, Mu},
  booktitle = {International Conference on Machine Learning (ICML)},
  year      = {2026},
  url       = {https://openreview.net/pdf?id=ysOOfySED6},
}

License#

Released under the MIT License.

Files

13 files · 5.50 GBWeights 5.50 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 13 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
.gitignore19 B862263fa1f46c20f0d1e4dac5ffcc75abd55c08211b2c3864c5f8764b9d87793
LICENSE1.07 KB275b4dd619de4e16a017b10d0beec72abbbbf14ee8a2fc68f8bdb398e821f623
README.md10.7 KB203fd46b6bc304bcac2b3db67c47df4da7c13d316520f15d6ed9b61ae61f3fed
config.json2.33 KB91e3367afb50c33a71a4db5cf87834b1cfc646c5681d67a3c1e2668f8bc02cbd
examples/reconstruction.ipynb6.54 KB25f8a4e3faba1f8ee089f6a7561de0c06a4d9790617c633843670dbf1f2270a1
factorization.svg325 KB40464573a90fe93f215319c8e84fe496e22db6fa5d34a3f671ba2ead2553ba1e
load_stellar.py4.73 KB92382c148ad59363aa0d2074a7c6848a0c8d622d09b992687c8343db2b9eeed5
stellar-b16.safetensors483 MB061489f86230a9609c5794018dadad3feaecbff9b31df1e4cab702f9c4414500
stellar-b24.safetensors483 MB6859aead6faa6095d51d0c60821f1f903c4409ab64fd887527a4906e05993295
stellar-b8.safetensors483 MBd9b81262070b5b362c93b8ad24020f6c3de51a6fcce82411cf30ad9b82a1daf0
stellar-h16.safetensors2.69 GBd930de83e0cdbb902a70dbd5a954acf7e69591c5759bca59820677c8ff46ff09
stellar-l16.safetensors1.36 GB7428079417b5ec89b609d5ef52c3230ef97423dfa62c73264d05e3d98c9944dd
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
7db838fa43 pinned now2026-11-15 04:12 UTC13 files · 5.50 GB

Use it

$ fw get microsoft/STELLAR
# manifest sha256 112dedf7ce8d… · 5.50 GB · 13 files
$ fw verify ./STELLAR microsoft/STELLAR
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/STELLAR.json --dir ./STELLAR $ python3 fw.py verify ./STELLAR ./microsoft__STELLAR.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/STELLAR --revision 7db838fa43ddd91838fcfdcec1a50dcef097a16f --local-dir ./STELLAR

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE
Text sha256
275b4dd619de4e16a017b10d0beec72abbbbf14ee8a2fc68f8bdb398e821f623
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject: STELLARDate: 2026-11-15Commit: 7db838fSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/STELLAR
Pinned commit
7db838fa43ddd91838fcfdcec1a50dcef097a16f
Manifest
STELLAR.json · .minisig
Manifest sha256
112dedf7ce8dce7524bf860d9a25a8b6d9bd2072d034e7fb8e506eb8226c0627
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:12 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/STELLAR.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/STELLAR.json.minisig $ minisign -Vm STELLAR.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/STELLAR
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. STELLAR.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX