--- tags: - gguf - llama.cpp - unsloth - roblox - lua - luau license: mit language: - en base_model: - unsloth/Qwen3.5-4B-GGUF --- **/ Roblox_Coder V2** ## / Model Overview **Roblox_Coder V2** is a fine-tuned version of **Qwen 3.5 4B**, trained specifically for **Roblox Studio development and Luau programming**. It is designed to act as a **Roblox backend + systems development assistant**, capable of generating structured, server-authoritative, and production-style Luau code for real Roblox game development workflows. | **Developed by** | preferredev | | --- | --- | | **Base model** | Qwen 3.5 4B Instruct | | **Fine-tuning method** | QLoRA, 4-bit nf4, double quantization | | **License** | Apache 2.0 | | **Language(s)** | English, Luau — Roblox-specific fork of Lua | | **Dataset size** | 3,016 instruction examples | | **Train / validation split** | 2,666 train / 295 validation | | **Dataset focus** | Server-authoritative Roblox systems, secure networking, DataStores, gameplay systems, and production-style Luau | ## / Model Capabilities This model is optimized for **Roblox systems engineering** and performs best on backend-heavy development tasks. The model was trained on an instruction dataset focused on high-quality Roblox systems design, covering backend architecture, secure scripting patterns, scalable game development workflows, and common Roblox services. - Server-authoritative game architecture - DataStore systems and persistence - RemoteEvent / RemoteFunction networking - Secure combat and anti-exploit patterns - NPC AI and Pathfinding systems - Inventory, shop, economy, and progression systems - UI frameworks and Roblox client systems - Performance-aware Luau scripting patterns - ModuleScript APIs, service-style architecture, and bootstrap loaders - Debugging and refactoring insecure or outdated Roblox code ## / Core Strengths - Generates structured Luau systems, including services, modules, classes, and framework-style code - Strong understanding of **client-server separation** - Produces secure **server-authoritative gameplay logic** - Implements **DataStore-backed progression systems** with `pcall`, retry/backoff, and save-on-leave patterns - Builds scalable **inventory, shop, currency, and economy systems** - Designs **NPC AI with PathfindingService** and simple finite-state-machine behavior - Handles **RemoteEvent validation, RemoteFunction safety, rate limiting, and anti-exploit logic** - Creates modular Roblox architecture patterns, including service-based design and shared network wrappers - Avoids deprecated Roblox/Luau patterns such as `wait`, `spawn`, `delay`, `:remove()`, and direct `game.Workspace` usage where modern alternatives are better ## / Advanced Behavior - Enforces anti-exploit security by default in generated code - Prefers scalable architecture over quick one-off scripts - Uses strict typing patterns where applicable, including `--!strict` - Encourages server-side validation for all critical gameplay, economy, combat, and inventory logic - Produces production-style Luau structure rather than beginner-only scripts - Tends to include Roblox service setup, validation helpers, cooldowns, debounces, and safe persistence patterns - Refactors insecure client-trust patterns into server-authoritative implementations ## / Known Limitations - Not optimized for animation, VFX, or art-heavy systems - Limited coverage of Studio UI/UX design workflows - May over-engineer simple tasks into full systems - Dataset is mostly synthetic/template-generated, so outputs may sometimes share a similar style or structure - May add security, validation, or persistence boilerplate even when a simpler snippet would be enough - Not guaranteed to understand newer or less-common Roblox APIs outside the training coverage - Weaker on large multi-file architecture, complex typed Luau generics, and long debugging tasks requiring state tracing across many files - Not a replacement for real testing, code review, exploit testing, or Roblox Studio validation ## / System Requirements This model can run locally in **GGUF** or other quantized formats using compatible runtimes. Supported local runtimes include: - llama.cpp - LM Studio - Ollama - KoboldCpp - Other GGUF-compatible inference backends ## / Model Sizes | Quantization | Size | Recommended Use | | --- | --- | --- | | Q4_K_M | ~2.78 GB | Fast inference for low-VRAM or CPU-based systems | | Q5_K_M | ~3.16 GB | Balanced quality and performance | | Q8_0 | ~4.61 GB | Higher-quality inference for stronger local hardware | ## / Hardware Requirements ### Minimum - 8 GB system RAM - CPU inference supported - GGUF runtime such as llama.cpp, LM Studio, or Ollama ### Recommended - 12–16 GB RAM or VRAM - GPU acceleration, NVIDIA preferred - Fast SSD for model loading ### Optimal - 8 GB+ VRAM GPU for smooth Q8 inference - CUDA-enabled inference backend - Enough memory headroom for longer prompts and larger Roblox code generations ## / Model & Links - Hugging Face: https://huggingface.co/preferredev/Roblox-Coder-v2_gguf - GitHub: https://github.com/preferredev/Roblox-Coder-v2 ## / Intended Use This model is intended for: - Roblox Studio developers - Luau backend system design - Secure Roblox architecture learning - Rapid prototyping of Roblox game systems - Server-side gameplay systems - DataStore-backed progression systems - Combat, inventory, shop, NPC, and economy logic - Refactoring insecure Roblox scripts into safer server-authoritative code ## / Example Prompts ### Roblox backend systems - “Create a secure server-side shop system where players can buy tools using coins.” - “Write a DataStore-backed player profile system with retries and save-on-leave.” - “Build a server-authoritative inventory module with add, remove, has, and capacity limits.” ### Networking and anti-exploit - “Wire up a RemoteEvent for buying an item, but validate the price and ownership on the server.” - “Add a rate limit so a player can only fire AttackRemote 5 times per second.” - “Fix this OnServerEvent that trusts a client-supplied coin amount.” ### NPCs and gameplay - “Create an NPC that chases the nearest player within 40 studs using PathfindingService.” - “Write a server-side melee weapon with range checks, cooldowns, and validated hit detection.” - “Build a raycast gun with server-side hit validation and ammo tracking.” ## / Evaluation Guidance Recommended evaluation before production use: - Run generated code through a real Luau checker such as `luau-analyze` or `selene` - Test generated systems inside Roblox Studio - Scan for deprecated or unsafe patterns such as `wait(`, `spawn(`, `delay(`, `:remove()`, and insecure client-trust logic - Red-team networking prompts to ensure the model does not trust client-supplied currency, inventory, damage, or ownership state - Compare outputs against the base model and earlier fine-tune versions for parse validity, security, and task success ## / Safety & Security Notes Roblox_Coder is designed to prefer secure, server-authoritative implementations. However, generated code should still be reviewed carefully. For production Roblox games: - Never trust client-supplied economy, combat, inventory, or ownership data - Validate all RemoteEvent and RemoteFunction arguments on the server - Rate-limit sensitive remotes - Wrap DataStore calls in `pcall` - Add retry/backoff behavior for persistence - Test edge cases, exploit attempts, and failure modes manually ## / Notes This is the **v2 fine-tune**, Future versions may expand dataset coverage to animation systems, tooling, UI frameworks, full game development pipelines, typed Luau, multi-file project architecture, and more diverse real-world Roblox code examples.