Image-Text-to-Text
Transformers
Safetensors
qwen3_5
vision-language
vlm
document-understanding
structured-extraction
information-extraction
ocr
document-to-markdown
markdown
rag
reasoning
multilingual
conversational
8-bit precision
compressed-tensors
Instructions to use numind/NuExtract3-W8A8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use numind/NuExtract3-W8A8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="numind/NuExtract3-W8A8") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("numind/NuExtract3-W8A8") model = AutoModelForMultimodalLM.from_pretrained("numind/NuExtract3-W8A8", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use numind/NuExtract3-W8A8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "numind/NuExtract3-W8A8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "numind/NuExtract3-W8A8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/numind/NuExtract3-W8A8
- SGLang
How to use numind/NuExtract3-W8A8 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "numind/NuExtract3-W8A8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "numind/NuExtract3-W8A8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "numind/NuExtract3-W8A8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "numind/NuExtract3-W8A8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use numind/NuExtract3-W8A8 with Docker Model Runner:
docker model run hf.co/numind/NuExtract3-W8A8
Upload folder using huggingface_hub
Browse files- config.json +2 -1
- model.safetensors.index.json +18 -4
- model_mtp.safetensors +3 -0
config.json
CHANGED
|
@@ -272,7 +272,8 @@
|
|
| 272 |
"model.language_model.layers.30.linear_attn.in_proj_z",
|
| 273 |
"model.language_model.layers.30.linear_attn.in_proj_b",
|
| 274 |
"model.language_model.layers.30.linear_attn.in_proj_a",
|
| 275 |
-
"lm_head"
|
|
|
|
| 276 |
],
|
| 277 |
"kv_cache_scheme": null,
|
| 278 |
"quant_method": "compressed-tensors",
|
|
|
|
| 272 |
"model.language_model.layers.30.linear_attn.in_proj_z",
|
| 273 |
"model.language_model.layers.30.linear_attn.in_proj_b",
|
| 274 |
"model.language_model.layers.30.linear_attn.in_proj_a",
|
| 275 |
+
"lm_head",
|
| 276 |
+
"re:^mtp.*"
|
| 277 |
],
|
| 278 |
"kv_cache_scheme": null,
|
| 279 |
"quant_method": "compressed-tensors",
|
model.safetensors.index.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"
|
| 4 |
-
"total_size": 6521553920
|
| 5 |
},
|
| 6 |
"weight_map": {
|
| 7 |
"model.language_model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
|
@@ -854,6 +853,21 @@
|
|
| 854 |
"model.visual.merger.norm.weight": "model-00002-of-00002.safetensors",
|
| 855 |
"model.visual.patch_embed.proj.bias": "model-00002-of-00002.safetensors",
|
| 856 |
"model.visual.patch_embed.proj.weight": "model-00002-of-00002.safetensors",
|
| 857 |
-
"model.visual.pos_embed.weight": "model-00002-of-00002.safetensors"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 858 |
}
|
| 859 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 6762860024
|
|
|
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"model.language_model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
|
|
|
| 853 |
"model.visual.merger.norm.weight": "model-00002-of-00002.safetensors",
|
| 854 |
"model.visual.patch_embed.proj.bias": "model-00002-of-00002.safetensors",
|
| 855 |
"model.visual.patch_embed.proj.weight": "model-00002-of-00002.safetensors",
|
| 856 |
+
"model.visual.pos_embed.weight": "model-00002-of-00002.safetensors",
|
| 857 |
+
"mtp.fc.weight": "model_mtp.safetensors",
|
| 858 |
+
"mtp.layers.0.input_layernorm.weight": "model_mtp.safetensors",
|
| 859 |
+
"mtp.layers.0.mlp.down_proj.weight": "model_mtp.safetensors",
|
| 860 |
+
"mtp.layers.0.mlp.gate_proj.weight": "model_mtp.safetensors",
|
| 861 |
+
"mtp.layers.0.mlp.up_proj.weight": "model_mtp.safetensors",
|
| 862 |
+
"mtp.layers.0.post_attention_layernorm.weight": "model_mtp.safetensors",
|
| 863 |
+
"mtp.layers.0.self_attn.k_norm.weight": "model_mtp.safetensors",
|
| 864 |
+
"mtp.layers.0.self_attn.k_proj.weight": "model_mtp.safetensors",
|
| 865 |
+
"mtp.layers.0.self_attn.o_proj.weight": "model_mtp.safetensors",
|
| 866 |
+
"mtp.layers.0.self_attn.q_norm.weight": "model_mtp.safetensors",
|
| 867 |
+
"mtp.layers.0.self_attn.q_proj.weight": "model_mtp.safetensors",
|
| 868 |
+
"mtp.layers.0.self_attn.v_proj.weight": "model_mtp.safetensors",
|
| 869 |
+
"mtp.norm.weight": "model_mtp.safetensors",
|
| 870 |
+
"mtp.pre_fc_norm_embedding.weight": "model_mtp.safetensors",
|
| 871 |
+
"mtp.pre_fc_norm_hidden.weight": "model_mtp.safetensors"
|
| 872 |
}
|
| 873 |
+
}
|
model_mtp.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f993d7b896c6d3c72ee66fd446b28bcf316d5f5ce4a0427c0442dfe461cbe1b
|
| 3 |
+
size 241200704
|