Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
mtp
experimental
llm-compressor
text-generation-inference
code
OpenSCAD
code-to-3d
Object-Generation
3D-design
CAD
Parametric-3D
nvfp4
nvidia
speculative-decoding
nvidia-blackwell
rtx-pro-6000
SM120
GB202
B200
B300
FP4
blackwell
Qwen3.5
Qwen3.6
Qwen3.8
multimodal
mixed-precision
conversational
quantized
Alibaba
SFT
8-bit precision
compressed-tensors
Instructions to use prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4") 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("prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4", 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 prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4", "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/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4
- SGLang
How to use prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4 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 "prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4" \ --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": "prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4", "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 "prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4" \ --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": "prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4", "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 prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4 with Docker Model Runner:
docker model run hf.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4
File size: 5,442 Bytes
e2dac50 bf1aac9 afd48a0 7256c67 bf1aac9 afd48a0 e2dac50 7c133e5 7024b5f 03f6aab 7024b5f 6ad98f4 7c133e5 5892d75 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | ---
library_name: transformers
license: apache-2.0
language:
- en
base_model:
- prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview
pipeline_tag: image-text-to-text
tags:
- mtp
- experimental
- llm-compressor
- text-generation-inference
- code
- OpenSCAD
- code-to-3d
- Object-Generation
- 3D-design
- CAD
- Parametric-3D
- nvfp4
- nvidia
- speculative-decoding
- nvidia-blackwell
- rtx-pro-6000
- SM120
- GB202
- B200
- B300
- FP4
- blackwell
- Qwen3.5
- Qwen3.6
- Qwen3.8
- multimodal
- mixed-precision
- conversational
- quantized
- Alibaba
- SFT
datasets:
- prithivMLmods/OpenSCAD-Code-to-3D-50K-HF
---
# **OpenSCAD-Code-Qwen3.5-Preview-NVFP4**
> **OpenSCAD-Code-Qwen3.5-Preview-NVFP4** is a 9-billion-parameter NVFP4-quantized build of **OpenSCAD-Code-Qwen3.5-Preview**, based on Qwen3.5-9B and fine-tuned on approximately 11,000 samples from the prithivMLmods/OpenSCAD-Code-to-3D-50K-HF dataset for text-to-OpenSCAD (`.scad`) code generation. It translates natural language descriptions into parametric 3D modeling code for geometric shapes, mechanical components, functional objects, and structural designs. Quantized using GPTQ (Accurate Post-Training Quantization for Generative Pre-trained Transformers), GPTQ calibration helps stabilize and optimize NVFP4 compression, preserving accuracy close to the full-precision weights while reducing memory usage and accelerating inference on NVFP4-capable hardware. This remains a preview and experimental model, and generated code may require manual inspection, debugging, and refinement.
> [!IMPORTANT]
> This model is experimental and currently in preview. It may generate artifacts, as it is still under training. A stable version will be released soon.
> [!NOTE]
> MTP — Speculative Decoding: Yes
## Quantization Recipe
The model is quantized using the `GPTQModifier` with the `NVFP4` quantization scheme.
```yaml
default_stage:
default_modifiers:
GPTQModifier:
targets: [Linear]
ignore: [lm_head, 're:.*visual.*']
scheme: NVFP4
weight_observer: imatrix_mse
bypass_divisibility_checks: false
requires_calibration_data: true
block_size: 128
dampening_frac: 0.01
batched_quantization: auto
```
## Model Files
| File Name | File Type | File Size | File Link | Description |
|-----------|-----------|-----------|-----------|-------------|
| chat_template.jinja | Jinja Template | 7.76 kB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/chat_template.jinja) | Chat template for formatting conversations and prompts. |
| config.json | JSON | 9.47 kB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/config.json) | Core model architecture and configuration parameters. |
| generation_config.json | JSON | 153 Bytes | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/generation_config.json) | Default text generation parameters (e.g., temperature, top_p). |
| model-00001-of-00002.safetensors | Safetensors | 4.99 GB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/model-00001-of-00002.safetensors) | Model weight shard 1/2. **Required** to load the model. |
| model-00002-of-00002.safetensors | Safetensors | 3.89 GB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/model-00002-of-00002.safetensors) | Model weight shard 2/2. **Required** to load the model. |
| model.safetensors.index.json | JSON | 153 kB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/model.safetensors.index.json) | Index file mapping model weights to their respective shards. |
| model_mtp.safetensors | Safetensors | 487 MB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/model_mtp.safetensors) | Multi-Token Prediction (MTP) auxiliary model weights, used to speed up generation. |
| processor_config.json | JSON | 1.33 kB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/processor_config.json) | Configuration for the multimodal (vision/image) processor. |
| recipe.yaml | YAML | 334 Bytes | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/recipe.yaml) | Configuration file detailing the quantization or training recipe (e.g., NVFP4 parameters). |
| tokenizer.json | JSON | 20 MB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/tokenizer.json) | Complete tokenizer vocabulary and encoding rules. |
| tokenizer_config.json | JSON | 1.33 kB | [Link](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview-NVFP4/blob/main/tokenizer_config.json) | Tokenizer-specific configuration parameters. |
## License and Attribution
This model is based on and/or incorporates the following open-source projects and models:
* **Qwen3.5-9B:** [https://huggingface.co/Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B)
* **OpenSCAD-Code-Qwen3.5-Preview:** [OpenSCAD-Code-Qwen3.5-Preview](https://huggingface.co/prithivMLmods/OpenSCAD-Code-Qwen3.5-Preview)
* **llm-compressor:** [https://github.com/vllm-project/llm-compressor](https://github.com/vllm-project/llm-compressor)
This model is released under the [Apache License 2.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md). |