Text Generation
PEFT
Safetensors
minecraft
java
spigot
papermc
lora
unsloth
qwen2.5-coder
conversational
Instructions to use Akahsizrr/toncode-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Akahsizrr/toncode-v1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen2.5-coder-7b-instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "Akahsizrr/toncode-v1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use Akahsizrr/toncode-v1 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Akahsizrr/toncode-v1 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Akahsizrr/toncode-v1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Akahsizrr/toncode-v1 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Akahsizrr/toncode-v1", max_seq_length=2048, )
| base_model: unsloth/qwen2.5-coder-7b-instruct-bnb-4bit | |
| library_name: peft | |
| pipeline_tag: text-generation | |
| tags: | |
| - minecraft | |
| - java | |
| - spigot | |
| - papermc | |
| - lora | |
| - unsloth | |
| - qwen2.5-coder | |
| # toncode-v1: Minecraft Plugin Coder | |
| This model is a fine-tuned LoRA adapter for **Qwen2.5-Coder-7B-Instruct**, specialized in generating high-quality Java code for Minecraft server plugins (Spigot/Paper API). | |
| ## Model Details | |
| - **Developed by:** Akahsizrr | |
| - **Model type:** LoRA Adapter (PEFT) | |
| - **Base Model:** Qwen/Qwen2.5-Coder-7B-Instruct | |
| - **Language(s):** English, Java (Minecraft Spigot/Paper API) | |
| - **License:** Apache-2.0 | |
| - **Finetuned from model:** unsloth/qwen2.5-coder-7b-instruct-bnb-4bit | |
| ## Training Details | |
| The model was trained using **Unsloth** on a Minecraft-specific dataset containing optimized plugin logic and event handling. | |
| - **Training Steps:** 100 | |
| - **Optimizer:** AdamW 8-bit | |
| - **Learning Rate:** 2e-4 | |
| - **Hardware:** 2x NVIDIA T4 (Kaggle) | |
| - **Batch Size:** 1 (with Gradient Accumulation Steps: 8) | |
| ## How to Get Started | |
| To use this model, you need to load it as an adapter on top of the base Qwen2.5-Coder model using the `peft` or `unsloth` library. | |
| ```python | |
| from unsloth import FastLanguageModel | |
| import torch | |
| model, tokenizer = FastLanguageModel.from_pretrained( | |
| model_name = "unsloth/qwen2.5-coder-7b-instruct-bnb-4bit", | |
| max_seq_length = 2048, | |
| load_in_4bit = True, | |
| ) | |
| # Load your fine-tuned adapter | |
| model = FastLanguageModel.for_inference(model) | |
| model.load_adapter("Akahsizrr/toncode-v1") | |
| # Test prompt | |
| instruction = "Create a listener that gives a player a Diamond Sword when they first join the server." | |
| messages = [{"role": "user", "content": instruction}] | |
| inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to("cuda") | |
| outputs = model.generate(input_ids=inputs, max_new_tokens=512) | |
| print(tokenizer.batch_decode(outputs)[0]) |