Downloads · 30 days
0
Hash0x/Roblox-Coder-Llama-7B-v1
Roblox-Coder-Llama-7B-v1 is a machine learning model from Hash0x. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of codellama/CodeLlama-7b-instruct-hf, specialized in generating and understanding Luau code for development on the Roblox platform. It has been trained on a custom dataset of instru…
Downloads · 30 days
0
Access
Public
Updated Jun 12, 2025
Repo size
403 MB
Likes
1
Public
Click a slice to open those files.
.safetensors134 MB · 97%
From the Hugging Face model README
This model is a fine-tuned version of codellama/CodeLlama-7b-instruct-hf, specialized in generating and understanding Luau code for development on the Roblox platform. It has been trained on a custom dataset of instructions and responses in Spanish and English, with the goal of acting as an expert programming assistant for Roblox creators.
Roblox-Coder-Llama-7B-v1 is a language model designed to assist Roblox developers. It can generate Luau scripts from natural language descriptions, explain complex concepts of the Roblox API, and help optimize code. The goal of this project is to democratize game development on Roblox, making it more accessible for beginners and more efficient for experienced developers.
codellama/CodeLlama-7b-instruct-hfhttps://huggingface.co/Hash0x/Roblox-Coder-Llama-7B-v1https://huggingface.co/datasets/Hash0x/Roblox-Luau-Instruct-V1This model is intended for direct use via a text-generation pipeline for:
DataStoreService, CFrame, etc.).The model can be the foundation for creating more complex tools, such as:
This model should not be used to generate malicious code, exploits, or scripts that violate the Roblox Terms of Service. The generated code must always be reviewed by a human, as it may contain unintentional errors or vulnerabilities.
The model was trained on a limited dataset, which entails certain risks and limitations:
Never blindly trust the generated code! Treat the model as a very fast junior assistant. Always review, understand, and test the code it produces before implementing it in a real project. The best way to improve the model is by expanding the training dataset with more high-quality examples.
Use the code below to get started with the model using the transformers library.
import torch
from transformers import pipeline
# Make sure you are logged in with your HF token
# from huggingface_hub import login
# login()
pipe = pipeline(
"text-generation",
model="Hash0x/Roblox-Coder-Llama-7B-v1",
torch_dtype="auto",
device_map="auto"
)
prompt = "Create a script that makes a part spin constantly on its Y-axis."
# CodeLlama uses a specific prompt format
formatted_prompt = f"<s>[INST] {prompt} [/INST]"
result = pipe(
formatted_prompt,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
top_k=50,
top_p=0.95
)
print(result[0]['generated_text'])
The model was trained using the Hash0x/Roblox-Luau-Instruct-V1 dataset. This dataset was created from several sources:
The model was fine-tuned using the QLoRA (Quantized Low-Rank Adaptation) technique to make training efficient on a single GPU.
The instructions and responses from the dataset were formatted into a prompt that follows the format expected by the base model: <s>[INST] {instruction} [/INST] {output}.
per_device_train_batch_size: 1gradient_accumulation_steps: 4 (effective batch size of 4)learning_rate: 2e-4num_train_epochs: 1-3optim: paged_adamw_32bitr: 64alpha: 16The model's evaluation to date has been qualitative, testing its ability to respond to a variety of prompts and analyzing the quality of the generated code. No formal quantitative evaluation with standard metrics has been performed.
The base model, codellama/CodeLlama-7b-instruct-hf, is a Causal Language Model based on the Llama 2 architecture. The fine-tuning objective was Causal Language Modeling optimization for Luau code generation.
Training was performed in the Google Colab environment, using a single NVIDIA T4 GPU with ~15 GB of VRAM.
transformers, datasets, accelerate, peft, bitsandbytes, trl.For questions or feedback, please contact through the Hash0x Hugging Face profile.