Instructions to use Shrijanagain/GEMMA-3D-CODER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Shrijanagain/GEMMA-3D-CODER with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Shrijanagain/GEMMA-3D-CODER") 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("Shrijanagain/GEMMA-3D-CODER") model = AutoModelForMultimodalLM.from_pretrained("Shrijanagain/GEMMA-3D-CODER", 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 Shrijanagain/GEMMA-3D-CODER with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Shrijanagain/GEMMA-3D-CODER" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shrijanagain/GEMMA-3D-CODER", "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/Shrijanagain/GEMMA-3D-CODER
- SGLang
How to use Shrijanagain/GEMMA-3D-CODER 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 "Shrijanagain/GEMMA-3D-CODER" \ --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": "Shrijanagain/GEMMA-3D-CODER", "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 "Shrijanagain/GEMMA-3D-CODER" \ --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": "Shrijanagain/GEMMA-3D-CODER", "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 Shrijanagain/GEMMA-3D-CODER with Docker Model Runner:
docker model run hf.co/Shrijanagain/GEMMA-3D-CODER
Early Release: This is an initial experimental release of GEMMA-3D-CODER. Future updates will feature improved prompt adherence, expanded 3D asset generation formats, and better multi-turn context retention.
GEMMA-3D-CODER
GEMMA-3D-CODER is an experimental open-weight language model fine-tuned specifically for general-purpose coding and high-quality 3D scene / game asset generation using Three.js and web-standard technologies.
It is trained to understand natural language prompts and translate them into robust, self-contained HTML/JavaScript scenes or GLB-compatible game assets tailored for engines like Godot.
Example Prompts & Capabilities
This model excels at generating interactive, low-poly, voxel-style 3D scenes and procedural scripts via Three.js from CDN (cdnjs)[cite: 1].
Example 1: treasure chest
User: Create a treasure chest that can open and close
Output:
Example 2: Adventurer Utility Belt
User: Please create one self-contained HTML file with Three.js from cdnjs showing an Adventurer utility belt. Output:
GGUF DOWNLOAD
| Format | Download | Notes |
|---|---|---|
| GGUF · IQ4_XS | GEMMA-3D-CODER.IQ4_XS.gguf | Extremely small 4-bit importance matrix quantization. |
| GGUF · Q2_K | GEMMA-3D-CODER.Q2_K.gguf | 2-bit k-quant for maximum size reduction. |
| GGUF · Q3_K_L | GEMMA-3D-CODER.Q3_K_L.gguf | Large 3-bit k-quant variant. |
| GGUF · Q3_K_M | GEMMA-3D-CODER.Q3_K_M.gguf | Medium 3-bit k-quant variant. |
| GGUF · Q3_K_S | GEMMA-3D-CODER.Q3_K_S.gguf | Small 3-bit k-quant variant. |
| GGUF · Q4_K_M | GEMMA-3D-CODER.Q4_K_M.gguf | Medium 4-bit k-quant (recommended balance). |
| GGUF · Q4_K_S | GEMMA-3D-CODER.Q4_K_S.gguf | Small 4-bit k-quant variant. |
| GGUF · Q5_K_M | GEMMA-3D-CODER.Q5_K_M.gguf | Medium 5-bit k-quant for higher fidelity. |
| GGUF · Q5_K_S | GEMMA-3D-CODER.Q5_K_S.gguf | Small 5-bit k-quant variant. |
| GGUF · Q6_K | GEMMA-3D-CODER.Q6_K.gguf | 6-bit k-quant for near-lossless performance. |
| GGUF · Q8_0 | GEMMA-3D-CODER.Q8_0.gguf | 8-bit quantization for high precision. |
| GGUF · f16 | GEMMA-3D-CODER.f16.gguf | Unquantized 16-bit floating point weights. |
| Multimodal Projector · Q8_0 | GEMMA-3D-CODER.mmproj-Q8_0.gguf | 8-bit vision/multimodal projector weights. |
| Multimodal Projector · f16 | GEMMA-3D-CODER.mmproj-f16.gguf | 16-bit unquantized vision/multimodal projector weights. |
🛠️ Quick Start (Usage with Transformers)
You can load and use this model directly using Hugging Face transformers:
from transformers import AutoProcessor, AutoModelForCausalLM
import torch
processor = AutoProcessor.from_pretrained("Shrijanagain/GEMMA-3D-CODER", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"Shrijanagain/GEMMA-3D-CODER",
torch_dtype=torch.float16,
device_map="auto"
)
messages = [
{
"role": "system",
"content": "Create game assets for the Godot editor, which uses GLB files. Create whatever the user requests as a good-quality assets."
},
{
"role": "user",
"content": "Create a low-poly goblin game asset using Three.js core module."
}
]
prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=prompt, return_tensors="pt").to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=4096,
use_cache=True,
temperature=0.7
)
print(processor.batch_decode(outputs, skip_special_tokens=True)[0])
**System prompt for Three.js scenes**
Create high-quality, production-ready low-poly 3D game assets specifically optimized for the Godot engine (which uses the GLB/GLTF format).
Requirements:
- Build the asset using only Three.js (latest stable version via CDN).
- Deliver everything as a single, complete, standalone HTML file. No external dependencies except the Three.js CDN, no build steps, no additional files.
- The HTML page must:
- Immediately display the 3D asset in a clean, well-lit scene with proper camera controls (OrbitControls).
- Include a clear, visible “Export GLB” button.
- When the button is clicked, generate and download a fully working .glb file that can be directly imported into Godot without errors.
- Asset style: Clean, good-quality low-poly aesthetic suitable for games (clean topology, reasonable poly count, proper UVs if needed, consistent scale, correct origin/pivot).
- If the requested asset logically needs animation (e.g., character idle, rotating propeller, opening door, bouncing object, etc.), implement a smooth looping animation and make sure the animation is correctly exported inside the GLB (including animation tracks).
- If no animation is needed, export a clean static GLB.
- Use proper materials, lighting, and basic PBR where appropriate so the asset looks good both in the Three.js preview and after import into Godot.
- Keep the code well-structured, readable, and commented so it can be easily modified later.
- Handle the GLB export correctly using Three.js’s GLTFExporter (including animations when present).
When the user describes an asset (or simply says what they want), generate the complete HTML file that fulfills all the above requirements.
### Output length and thinking
| Parameter | Recommended setting |
|:---|:---|
| Maximum output tokens | **Unlimited — `-1` where supported** |
| Thinking / reasoning | **Enabled, with no effort limit or separate thinking-token budget** |
**An output limit is too restrictive for these generations** and can stop the response during thinking or before the HTML is complete, leaving incomplete or unusable code. Set the output limit to **unlimited (`-1`)** in runtimes that support it.
Unlimited output removes the explicit generation cap; the runtime's context and resource limits still apply.
- Downloads last month
- 87

