Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/auto.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ so you never have to remember whether a checkpoint is a `BertModel` or a `DETRDe
```python
from zeromodels import AutoZModel, AutoZMTokenizer

model = AutoZModel.from_weights("zeromodels/bert-base-uncased") # -> BertModel
tok = AutoZMTokenizer.from_weights("zeromodels/bert-base-uncased")
model = AutoZModel.from_weights("zeromodels/bert_base_uncased") # -> BertModel
tok = AutoZMTokenizer.from_weights("zeromodels/bert_base_uncased")
```

This is the `transformers` `AutoModel` idea, ZeroModels flavored. The classes are named
Expand Down Expand Up @@ -89,7 +89,7 @@ task you want:
```python
from zeromodels.auto import AutoZMImageClassify, AutoZMSemanticSegment

clf = AutoZMImageClassify.from_weights("zeromodels/resnet-50")
clf = AutoZMImageClassify.from_weights("zeromodels/resnet50_a1_in1k")
seg = AutoZMSemanticSegment.from_weights("zeromodels/segformer_b0_ade_512")
```

Expand Down
22 changes: 11 additions & 11 deletions docs/grounding_dino.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Unlike [OWL-ViT](owlvit.md) and [OWLv2](owlv2.md), which score each patch indepe

## API

### GroundingDinoForObjectDetection
### GroundingDinoDetect

```python
GroundingDinoForObjectDetection(
GroundingDinoDetect(
...,
d_model=256,
decoder_layers=6,
num_queries=900,
max_text_len=256,
name="GroundingDinoForObjectDetection",
name="GroundingDinoDetect",
)
```

Expand Down Expand Up @@ -151,11 +151,11 @@ Both use the same BERT text encoder and a 6-layer decoder with 900 queries.
import torch
from PIL import Image
from zeromodels.models.grounding_dino import (
GroundingDinoForObjectDetection,
GroundingDinoDetect,
GroundingDinoProcessor,
)

model = GroundingDinoForObjectDetection.from_weights("zeromodels/grounding_dino_tiny")
model = GroundingDinoDetect.from_weights("zeromodels/grounding_dino_tiny")
processor = GroundingDinoProcessor.from_weights("zeromodels/grounding_dino_tiny")

image = Image.open("assets/data/coco_paddleboard.jpg").convert("RGB")
Expand Down Expand Up @@ -204,11 +204,11 @@ across images:
import torch
from PIL import Image
from zeromodels.models.grounding_dino import (
GroundingDinoForObjectDetection,
GroundingDinoDetect,
GroundingDinoProcessor,
)

model = GroundingDinoForObjectDetection.from_weights("zeromodels/grounding_dino_tiny")
model = GroundingDinoDetect.from_weights("zeromodels/grounding_dino_tiny")
# Batching a portrait with a landscape pads to the union of both. At the default
# 800/1333 that is ~29k tokens per image, enough to exhaust an 8 GB card.
processor = GroundingDinoProcessor.from_weights(
Expand Down Expand Up @@ -309,7 +309,7 @@ import keras

keras.config.set_image_data_format("channels_first")

model = GroundingDinoForObjectDetection.from_weights("zeromodels/grounding_dino_tiny")
model = GroundingDinoDetect.from_weights("zeromodels/grounding_dino_tiny")
processor = GroundingDinoProcessor.from_weights("zeromodels/grounding_dino_tiny")
```

Expand All @@ -323,15 +323,15 @@ Any Hugging Face repo whose `model_type` is `"grounding-dino"` loads directly wi
`hf:` prefix.

```python
from zeromodels.models.grounding_dino import GroundingDinoForObjectDetection
from zeromodels.models.grounding_dino import GroundingDinoDetect

# The original IDEA-Research checkpoints
model = GroundingDinoForObjectDetection.from_weights(
model = GroundingDinoDetect.from_weights(
"hf:IDEA-Research/grounding-dino-tiny"
)

# Somebody's fine-tune
model = GroundingDinoForObjectDetection.from_weights(
model = GroundingDinoDetect.from_weights(
"hf:<user>/grounding-dino-finetune"
)
```
Expand Down
7 changes: 4 additions & 3 deletions docs/quantization.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ model.save("model.keras")
model = keras.saving.load_model("model.keras") # rebuilt quantized, weights loaded

# Weights-only (.weights.h5) carries values, not structure, so the target must already
# be quantized before load_weights. From a Hub repo that is automatic (zm_config's
# quantization_config drives it):
model = Qwen3TextGenerate.from_weights("zeromodels/qwen3-4b-int8")
# be quantized before load_weights. If you publish a quantized Hub repo with a
# quantization_config in zm_config.json, the loader applies it automatically.
# Replace this illustrative repo ID with your published repo:
model = Qwen3TextGenerate.from_weights("<your-org>/qwen3-4b-int8")

# Into a hand-built model, apply the quantizer first, then load_weights. For a
# functional model preprocess_model returns a NEW (cloned) quantized model, so use it:
Expand Down
7 changes: 5 additions & 2 deletions docs/qwen3_vl_moe.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ Apache 2.0.
|---|---|
| `qwen3-vl-30b-a3b-instruct` | [`zeromodels/qwen3-vl-30b-a3b-instruct`](https://huggingface.co/zeromodels/qwen3-vl-30b-a3b-instruct) |
| `qwen3-vl-30b-a3b-thinking` | [`zeromodels/qwen3-vl-30b-a3b-thinking`](https://huggingface.co/zeromodels/qwen3-vl-30b-a3b-thinking) |
| `qwen3-vl-235b-a22b-instruct` | [`zeromodels/qwen3-vl-235b-a22b-instruct`](https://huggingface.co/zeromodels/qwen3-vl-235b-a22b-instruct) |
| `qwen3-vl-235b-a22b-thinking` | [`zeromodels/qwen3-vl-235b-a22b-thinking`](https://huggingface.co/zeromodels/qwen3-vl-235b-a22b-thinking) |

The 235B-A22B variants are not currently published as public ZeroModels weights.
Their [Instruct](https://huggingface.co/Qwen/Qwen3-VL-235B-A22B-Instruct) and
[Thinking](https://huggingface.co/Qwen/Qwen3-VL-235B-A22B-Thinking) checkpoints
are available from upstream Qwen.

Upstream Qwen safetensors also load directly via the `hf:` prefix, e.g.
`from_weights("hf:Qwen/Qwen3-VL-30B-A3B-Instruct")`, which converts them in process (pass
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/test_auto_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ def test_every_table_value_resolves_and_matches_its_task():
# tower and vice versa), so neither is a table default; load them via the concrete class.
"Gemma4MultimodalModel",
"Qwen3_5VLModel",
# Redundant transformers-named alias whose model_type ("grounding-dino") already maps to
# the zeromodels-convention sibling GroundingDinoDetect.
"GroundingDinoForObjectDetection",
# Components of the Stable Diffusion containers (loaded through the family's
# XModel / XTextToImage), never hosted repos of their own; keep diffusers' names,
# which carry no task suffix.
Expand Down
Loading