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: Low-Poly Game Asset

User: Create a low-poly goblin game asset using Three.js core module.

Example 2: Elephant Rehabilitation Habitat

User: Please create one self-contained HTML file with Three.js from cdnjs showing an elephant rehabilitation habitat as a deliberate 3D voxel model built from visible cubic blocks.


๐Ÿ› ๏ธ 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 low-poly asset using only Three.js."
    },
    {
        "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=2048,
    use_cache=True,
    temperature=0.7
)

print(processor.batch_decode(outputs, skip_special_tokens=True)[0])
Downloads last month
-
Safetensors
Model size
5B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Shrijanagain/GEMMA-3D-CODER

Finetuned
(155)
this model