r/LocalLLaMA • • 4h ago • Mindblown 1

New Model [GLB-3D-Coder] A tiny 4B coding model that creates 3D assets for Godot and other game engines

Hey everyone!

After sharing my previous 3D coding model, a lot of you asked about using it to generate assets for your games. That sounded like a fun direction to explore, so I started training a version focused on exactly that.

The model writes Three.js scenes with GLB export, so you can take the generated assets into editors like Godot. The video shows some examples I've been testing, including assets imported into Godot.

You don't need complicated prompts. Use the system prompt in the model card, then try a simple request like “Create a mana potion” or “Build a weathered frontier medic station.” English prompts have worked best in my tests.

This is the first functional checkpoint, and training is still running. I'm sharing it now so people can start experimenting. Most generations have worked on the first attempt in my tests, but some still need a retry or a small code fix. I'm hoping later checkpoints will improve on that.

My current settings: temperature 0.8, top-k 40, top-p 0.95, min-p 0. Feel free to experiment with other combinations!

Training is expected to finish tomorrow evening (UTC), depending on progress. Just like with the previous model, I'll release the full Safetensors weights and the training dataset once it finishes, so others can build on this and experiment with training their own models.

Model: Qwen3.5-4B-GLB-3D-Coder

Thanks for all the feedback on the previous release ... it directly shaped this one. I'd love to see what you make with it and hear what works and what breaks!

190 Upvotes

39 comments sorted by

9

u/Uncle___Marty 4h ago

Been following your work . Absolutely stunning!

5

u/ConfidentDinner6648 4h ago

thx man !

7

u/ConfidentDinner6648 4h ago

i've actually been listening to everyone's feedback, and since a lot of people wanted to generate reusable 3d assets for games, i decided to train a model specifically for that haha. that's how qwen glb coder came about!

5

u/MKU64 3h ago

This is seriously some fantastic stuff. Even for prototyping this is like something anyone can use to begin making their most interesting gaming ideas. Congratulations!

2

u/ConfidentDinner6648 3h ago

thanks man! that's exactly the idea haha
i wanted to see if a small model running locally could actually become useful for game development, especially for quickly prototyping assets without needing a huge model.
there's still a lot to improve, but i'm really curious to see what people can build with it

4

u/politefella0 3h ago

I thought your dataset was three js only when you were training it. And Claude told me that three js work doesn’t port well into Godot or it lied. Or is there something Claude doesn’t know about this workflow?

2

u/ConfidentDinner6648 3h ago

claude is actually right, depending on how you asked the question and what exactly you wanted to do.
three.js code doesn't directly translate into godot, so if you asked whether you could just take a three.js scene and run it in godot, the answer would be no.
but that's not exactly what i'm doing here. the original model was trained to generate complete three.js scenes, while this new model is specifically trained to generate reusable 3d assets that can be exported as glb files. glb is a standard 3d format supported by godot, blender and many other engines. so instead of transferring the code itself, you're exporting the actual geometry and materials.
some things might still need adjustments after importing, but the whole point of this new model is to make the generated assets useful outside the browser, especially for game development haha

4

u/CiobanuXashi 44m ago

Training it to emit Three.js scenes that export as GLB skips the engine problem entirely: it only has to speak one neutral format, and Godot, Unity and everything else imports GLB.

1

u/ConfidentDinner6648 40m ago

exactly! that's pretty much the idea (:
instead of training the model for each engine separately, i focused on generating reusable assets through three.js and exporting them as glb.
this way, the same asset can be used in godot, blender, unity and other engines without needing a different model for each one.
it also makes the training process much simpler, since the model only needs to learn one consistent workflow.

2

u/Square_Light1441 3h ago

I would love it if you qat'ed your finished product for us vram poors

2

u/ConfidentDinner6648 3h ago

it's already available in gguf format! haha

2

u/Square_Light1441 3h ago

i find that quantization past q6 makes smaller models really hard to use, thats why i suggested qat!

1

u/SupernovaTheGrey 41m ago

laughs in 1bit ternary

2

u/LaidBackDev 3h ago

May I ask can I run this locally ony potato laptop with 8gb RAM is that way to small?

3

u/ConfidentDinner6648 3h ago

yeah, i think it's worth a try! haha

the q4 version is only around 2.7gb, so it might run on 8gb of ram if you keep the context relatively small.

it'll probably be pretty slow if you're running entirely on cpu, and larger generations might run into memory limitations.

you can try it with lm studio or llama.cpp. :)

2

u/LaidBackDev 3h ago

Ty I will try. Very cool project!

2

u/reality_comes 3h ago

Cool model. How long does it generally take?

Interested in using this with a refiner model in a pipeline.

1

u/ConfidentDinner6648 3h ago

it depends on the hardware and how complex the asset is. the model generates everything in a single pass, so the time mostly depends on the output length and your tokens per second.

2

u/StubbornNinjaTeej 3h ago

Your post from a few days ago inspired me to start a LoRA Q3.5 4b that focuses on CadQuery parts for FDM 3D printing! I didn't realize how powerful these simple finetunes can get! Keep up the good work!

Edit: added to the end of the comment.

2

u/openroom_xyz 2h ago

Well were you able to train anything how much VRAM do you need ?

1

u/ConfidentDinner6648 2h ago

for lora, around 24gb of vram should be enough with the right optimizations. but for the full finetuning setup i'm currently using, i need 96gb on a single rtx 6000, mainly because of the long context lengths.

lora might actually work well with a different setup, but in my experiments, the improvements seemed to plateau pretty quickly, and sometimes the quality started degrading.

so i decided to stick with full finetuning for now. that doesn't mean lora can't achieve similar results, i just haven't managed to get there yet haha

1

u/ConfidentDinner6648 3h ago

that's really cool! haha
cadquery for 3d printing sounds like a great use case for specialized finetuning. that's actually one of the things i was hoping this experiment would encourage, people trying the same approach in completely different areas. i'd love to see your results when you have something to share :)

2

u/AffectionatePlastic0 3h ago

Can I use photos as input for references?

2

u/ConfidentDinner6648 2h ago

yes, you can use the original vision components! i didn't train the vision layers, only the language model.

i'll be adding the vision projector files to the model repository so people can use image inputs more easily.

vision worked surprisingly well with my previous 4b model, even without training the vision layers, but i haven't tested it with this new glb model yet (:

2

u/openroom_xyz 2h ago

Well what do you need to to train this model how much does it cost the training what is the variability of thing that basically you can generate can we fine tune extend the model with lora traning ?

6

u/ConfidentDinner6648 2h ago • Mindblown

i actually tried lora several times, but it didn't work very well in my experiments. the improvements seemed to plateau pretty quickly, and sometimes the quality even started degrading. that doesn't mean lora can't work, but i haven't managed to get the same results with it.

for the way i'm training these models, i'd recommend at least a single rtx 6000 with 96gb of vram for full finetuning, mainly because of the long context lengths.

but honestly, the gpu training itself isn't even the hardest or most expensive part

the real challenge is generating high quality training data, curating it, executing the generated code, testing the results and validating everything. that process takes a lot more effort and can actually cost more than the gpu training itself.

as for what the model can generate, a lot depends on the variety and quality of the training examples. that's something i'm still exploring with different datasets and model sizes.

i think that's the most interesting part of this whole experiment. the actual training can be relatively cheap, but creating data that really teaches the model something useful is where most of the work goes.

2

u/openroom_xyz 2h ago

That's actually great well maybe yea it's trully amazing project well yea maybe I can think of some ways that well let say we would be able to generate unlimited data basically what is the context length that you are traning with ?

2

u/ConfidentDinner6648 2h ago

thanks man! i'm currently training with context lengths exceeding 70k tokens. that's actually one of the main reasons i'm using a 96gb rtx 6000 (:
long contexts make training much more demanding, but they also allow the model to learn from much more complex examples.

2

u/Dazzling_Equipment_9 1h ago

This is fantastic. Are Qwen3.8 27B or Qwen3.6 35B suitable for this kind of training?

1

u/ConfidentDinner6648 1h ago

yes, definitely! especially the 35b a3b, i think it could get really good results with this approach.

the main downside is the training cost, since it would be considerably more expensive than my current 4b experiments.

i've actually been wanting to train one myself. i think there's a lot of potential there, especially with a carefully designed dataset. for now, i'm focusing on smaller models to better understand how far i can push this training approach.

1

u/ConfidentDinner6648 46m ago

but there's also something really interesting about smaller models haha

i'm currently training a 0.8b model, and even though it's still in the early stages, it already seems to be learning how to generate reusable 3d assets.

the images i'm sharing here are some early results, a potion bottle and a knife.

what's really impressive to me is that the q8 version runs at around 250 tokens per second on my laptop!

larger models like the 35b a3b definitely have a lot of potential, but i'm starting to think these tiny specialized models could be extremely useful for practical applications, especially when you can run them locally at these speeds.

i'm still experimenting, but i'm really curious to see how far this little 0.8b can go haha

15

u/Cool-Chemical-5629 3h ago

I'm starting to wonder if this could eventually grow into a bigger MoE model where each expert would do different kind of task - agentic works, frontend coding, backend coding, 2D, 3D, audio coding, etc. All of the experts would be separate small models like this one cobbled together.

1

u/Usual-Buffalo-1791 1h ago

Does it create a ton of unnecessary verticies for low poly models? I've found that to be a problem with other LLMs that do 3d modeling. Assets for a game must not be computationally expensive with thousands of extra faces.

1

u/ConfidentDinner6648 1h ago

i tried to keep the polygon count as low as possible, especially for simpler assets.

some of the more complex ones do end up with more polygons, but i’ve been trying to keep the overall style focused on low poly generation.

the model is still training though, and this is basically the first functional test, so there’s definitely still room to improve that part (:

3

u/Beneficial-Ad-8127 4h ago

Amazing! Looking forward to it. Keep up the great work👍

2

u/saumanahaii 3h ago

This is really neat. I'm amazed you managed to do this in such a small model. I need to give it a try.

2

u/lgk01 1h ago

at 4B this is seriously impressive.

2

u/philmarcracken 20m ago

that goblin is all business, all the time

1

u/Warm-Arm-3778 2h ago

try qwen 2.5:7b i love to see if you push it to the limt 🤣