Instructions to use Vaingloryy/luau-agent-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vaingloryy/luau-agent-3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Vaingloryy/luau-agent-3b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Vaingloryy/luau-agent-3b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Vaingloryy/luau-agent-3b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Vaingloryy/luau-agent-3b:Q8_0 # Run inference directly in the terminal: llama cli -hf Vaingloryy/luau-agent-3b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Vaingloryy/luau-agent-3b:Q8_0 # Run inference directly in the terminal: llama cli -hf Vaingloryy/luau-agent-3b:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Vaingloryy/luau-agent-3b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf Vaingloryy/luau-agent-3b:Q8_0
Use Docker
docker model run hf.co/Vaingloryy/luau-agent-3b:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use Vaingloryy/luau-agent-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vaingloryy/luau-agent-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vaingloryy/luau-agent-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Vaingloryy/luau-agent-3b:Q8_0
- SGLang
How to use Vaingloryy/luau-agent-3b 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 "Vaingloryy/luau-agent-3b" \ --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": "Vaingloryy/luau-agent-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Vaingloryy/luau-agent-3b" \ --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": "Vaingloryy/luau-agent-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Vaingloryy/luau-agent-3b with Ollama:
ollama run hf.co/Vaingloryy/luau-agent-3b:Q8_0
- Unsloth Desktop
- Pi
How to use Vaingloryy/luau-agent-3b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Vaingloryy/luau-agent-3b:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Vaingloryy/luau-agent-3b:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Vaingloryy/luau-agent-3b with Docker Model Runner:
docker model run hf.co/Vaingloryy/luau-agent-3b:Q8_0
- Lemonade
How to use Vaingloryy/luau-agent-3b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Vaingloryy/luau-agent-3b:Q8_0
Run and chat with the model
lemonade run user.luau-agent-3b-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use Vaingloryy/luau-agent-3b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Vaingloryy/luau-agent-3b:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Vaingloryy/luau-agent-3b:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Vaingloryy/luau-agent-3b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Vaingloryy/luau-agent-3b:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Vaingloryy/luau-agent-3b:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
luau-agent 3b
A 3B paramater coding model for Roblox and Luau, with light fine tuning from Nanbeige 4.2 3B. Quality can be inconsistent due to the fine tuning, plus small errors within datasets. (buffers are the most prevalent incorrect data currently) Highly suggested to use a more competent model as an orchestrator, for the reason above.
Training
- Base model: Nanbeige 4.2 3B
- Fine-tuned on around 100 million tokens of data due to budget constraints.
- Stages: continued pretraining on luau code, then ran sft with AdamW optimizer on both, RL not performed due to budget constraints, this is the SFT checkpoint.
- Method: BF16 LoRA (r 64, alpha 64) on attention output and MLP projections, merged back into the full weights
- Knowledge cutoff: October 11th 2026
- Time taken to train: ~20 hours
- Hardware: 1x RTX PRO 6000 Blackwell @ Google Colab
Files
| model-0000*-of-00002.safetensors | Full merged BF16 weights for Transformers |
| luau-agent-3b-Q8_0.gguf | Q8_0 quant for llama.cpp, LM Studio, etc. |
Example output from one turn:
type HitInfo = {
hitPart: BasePart,
hitModel: Model?,
hitHumanoid: Humanoid?,
hitPosition: Vector3?,
}
type HitboxConfig = {
size: Vector3,
position: Vector3,
overlap: boolean, -- true → detect parts inside the box, false → detect parts overlapping the box
excludeList: { Instance }?, -- parts to ignore (usually the hitbox itself)
}
type Hitbox = {
config: HitboxConfig,
overlapParams: OverlapParams,
}
local Hitbox = {}
Hitbox.__index = Hitbox
function Hitbox.new(config: HitboxConfig): Hitbox
local self = setmetatable({}, Hitbox)
self.config = config
-- Default OverlapParams
local overlapParams = OverlapParams.new()
overlapParams.FilterType = Enum.RaycastFilterType.Exclude
overlapParams.FilterDescendantsInstances = {}
overlapParams.MaxParts = 64
overlapParams.RespectCanCollide = true
self.overlapParams = overlapParams
return self
end
function Hitbox.setExclude(self: Hitbox, list: { Instance })
self.overlapParams.FilterDescendantsInstances = list
end
function Hitbox.queryHitbox(self: Hitbox): {HitInfo}
local size = self.config.size
local pos = self.config.position
local region = Region3.new(pos - size / 2, pos + size / 2)
local parts = workspace:GetPartsInRegion3(region, self.overlapParams)
local results: {HitInfo} = {}
for _, part in parts do
local model = part:FindFirstAncestorOfClass("Model")
local humanoid = model and model:FindFirstChildOfClass("Humanoid")
table.insert(results, {
hitPart = part,
hitModel = model,
hitHumanoid = humanoid,
})
end
return results
end
function Hitbox.queryOverlap(self: Hitbox): {HitInfo}
local size = self.config.size
local pos = self.config.position
local parts = workspace:GetPartBoundsInBox(
pos - size / 2,
size,
self.overlapParams
)
local results: {HitInfo} = {}
for _, part in parts do
local model = part:FindFirstAncestorOfClass("Model")
local humanoid = model and model:FindFirstChildOfClass("Humanoid")
table.insert(results, {
hitPart = part,
hitModel = model,
hitHumanoid = humanoid,
})
end
return results
end
function Hitbox.applyDamage(self: Hitbox, humanoid: Humanoid, amount: number, force: number)
if humanoid then
humanoid:TakeDamage(amount * force)
end
end
return Hitbox
Setup
llama.cpp (recommended)
Needs a recent llama.cpp build with Nanbeige support.
# get the gguf
hf download Vaingloryy/luau-agent-3b luau-agent-3b-Q8_0.gguf --local-dir .
# run a server (OpenAI-compatible API on http://localhost:8080)
llama-server -m luau-agent-3b-Q8_0.gguf \
-ngl 99 -c 16384 -np 1 -fa on --jinja \
-ctk q8_0 -ctv q8_0 --spec-type ngram-mod \
--temp 1.0 --top-p 0.95 --top-k 20
llama.cpp settings
| Setting | Value | Why |
|---|---|---|
-ngl |
99 |
Put every layer on the GPU |
-c |
16384 |
Context it was trained on (long SFT rows go up to 16k) |
-np |
1 |
One slot, keeps all the context for one chat |
-fa |
on |
Flash attention, less VRAM |
--jinja |
on | Uses the built-in chat template, needed for tool calls |
-ctk / -ctv |
q8_0 |
Quantized KV cache, roughly halves its memory |
--spec-type |
ngram-mod |
Free speculative decoding, speeds up code edits that repeat text |
--temp |
1.0 |
Sampling settings from the base model |
--top-p |
0.95 |
|
--top-k |
20 |
Q8_0 needs about 5 GB of VRAM plus the KV cache.
Transformers
The model uses custom code, so trust_remote_code=True is required.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo = "Vaingloryy/luau-agent-3b"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
messages = [{"role": "user", "content": "Write a Luau module that tracks per-player cooldowns."}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
output = model.generate(inputs, max_new_tokens=1024, do_sample=True, temperature=1.0, top_p=0.95, top_k=20)
print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))
Credits
Thanks to the people behind these datasets and Pinkstack especially for helping me start:
- BackpropBuff/Principia_SimpleMath_Integers_1m
- Pinkstack/RobloxAgent-v2
- khtsly/LuauCoder-1.0-Preview-SFT
- nvidia/Nemotron-SFT-Instruction-Following-Chat-v2
- nvidia/Nemotron-SFT-SWE-v3.5
- khtsly/roblox-luau-corpus
- TorpedoSoftware/the-luau-stack
- Pinkstack/LuauDev-instructions-SFT-full
- Pinkstack/2026-Roblox-Luaudev2-dataset-sft
- Pinkstack/oct2026-Roblox-Luaudev2-dataset-pretrain
And to the Nanbeige team for the base model.
License
Apache License 2.0, same as the base model. See LICENSE.
This is a modified version of Nanbeige 4.2 3B: the weights were changed by fine-tuning as described above. The original model's copyright and license notices are kept. Datasets keep their own licenses and terms.
- Downloads last month
- -