diff --git a/docs/auto.md b/docs/auto.md index eeab82d6..9e169dfb 100644 --- a/docs/auto.md +++ b/docs/auto.md @@ -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 @@ -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") ``` diff --git a/docs/grounding_dino.md b/docs/grounding_dino.md index 64ad01bb..ce355788 100644 --- a/docs/grounding_dino.md +++ b/docs/grounding_dino.md @@ -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", ) ``` @@ -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") @@ -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( @@ -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") ``` @@ -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:/grounding-dino-finetune" ) ``` diff --git a/docs/quantization.md b/docs/quantization.md index 854c38ce..3b0a4f57 100644 --- a/docs/quantization.md +++ b/docs/quantization.md @@ -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("/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: diff --git a/docs/qwen3_vl_moe.md b/docs/qwen3_vl_moe.md index e04a0606..58829bee 100644 --- a/docs/qwen3_vl_moe.md +++ b/docs/qwen3_vl_moe.md @@ -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 diff --git a/tests/integration/test_auto_registry.py b/tests/integration/test_auto_registry.py index d4e53f8a..c1d92066 100644 --- a/tests/integration/test_auto_registry.py +++ b/tests/integration/test_auto_registry.py @@ -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.