Image-Text-to-Text
Transformers
Safetensors
qwen2_5_vl
conversational
Eval Results
text-generation-inference
Instructions to use numind/NuExtract-2.0-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use numind/NuExtract-2.0-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="numind/NuExtract-2.0-8B") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("numind/NuExtract-2.0-8B") model = AutoModelForMultimodalLM.from_pretrained("numind/NuExtract-2.0-8B", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use numind/NuExtract-2.0-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "numind/NuExtract-2.0-8B" # 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/NuExtract-2.0-8B", "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/NuExtract-2.0-8B
- SGLang
How to use numind/NuExtract-2.0-8B 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/NuExtract-2.0-8B" \ --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/NuExtract-2.0-8B", "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/NuExtract-2.0-8B" \ --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/NuExtract-2.0-8B", "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/NuExtract-2.0-8B with Docker Model Runner:
docker model run hf.co/numind/NuExtract-2.0-8B
Commit History
-
Update README.md
Verified signaturea470f0b
-
fix: remove duplicated chat_template and trailing comma (#6)
Verified signature- fix: remove duplicated chat_template and trailing comma (80a81b07852d308bff108548f55fde9aab4cd5b8) Co-authored-by: Gabriel Silva Rodrigues <Restodecoca@users.noreply.huggingface.co>99a1784 -
Update tokenizer_config.json
Verified signaturee40c957 -
Update chat_template.json
Verified signaturede12b4a
-
Update tokenizer_config.json
Verified signature540e743 -
Update chat_template.json
Verified signature1fcd854
-
Upload processor
Verified signature7f3fcea
-
Update README.md
Verified signatured92a654
-
Update logo_nuextract.svg
Verified signature379a3d1
-
Update README.md
Verified signature42339c9 -
Upload nuextract2_bench.png
Verified signature876775e -
Update README.md
Verified signature51e8e8e -
Upload logo_nuextract.svg
Verified signature88fcf47
-
Update README.md
Verified signature188db28 -
Update README.md
Verified signaturef59852e -
Update README.md
Verified signature640dfb3
-
Update tokenizer_config.json
Verified signatureb677867 -
Update chat_template.json
Verified signature73f5f47
-
Update tokenizer_config.json
Verified signature59dbe59 -
Update chat_template.json
Verified signatureb4db8c2
-
Update tokenizer_config.json
Verified signature030e728 -
Update chat_template.json
Verified signaturefa4a847
-
Update README.md
Verified signature05bfd61 -
Update chat_template.json
Verified signaturee5a36cc -
Update tokenizer_config.json
Verified signature070b45d
-
Upload processor
Verified signature081516a -
Upload Qwen2_5_VLForConditionalGeneration
Verified signaturef818735 -
initial commit
Verified signature1011215