Transformers
Safetensors
English
Russian
unsloth
qwen2.5
tool-calling
function-calling
cellsistant
jupyter
lora
finetune
Instructions to use coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling 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 coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling 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 coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling", max_seq_length=2048, )
Qwen2.5-Coder-1.5B - Cellsistant Tool Calling
Fine-tuned version of Qwen2.5-Coder-1.5B for tool calling in Cellsistant (AI assistant for JupyterLab).
Model Details
- Base Model: Qwen/Qwen2.5-Coder-1.5B-Instruct
- Training Framework: Unsloth (2x faster)
- Training Data: 2,342 examples for tool calling
- Training Time: 6.57 minutes on Tesla T4
- Training Loss: 0.39 → 0.00042
Supported Tools
The model supports 19 tools for Jupyter notebook manipulation:
Notebook Tools
create_cell- Create new cellsupdate_cell- Update cell contentdelete_cell- Delete cellsget_cell_content- Read cell contentget_notebook_content- Get full notebookexecute_cell- Execute code cellsget_cell_output- Get cell outputanalyze_image- Analyze plots/images
File Tools
read_file- Read fileswrite_file- Write fileslist_directory- List directoriescreate_notebook- Create notebooksdelete_file- Delete filesrename_file- Rename/move files
Other Tools
run_shell- Execute shell commandsfind_in_notebook- Search in notebookreplace_in_cell- Replace text in cellsinstall_package- Install Python packageslist_packages- List installed packages
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-Coder-1.5B-Instruct",
device_map="cuda",
torch_dtype=torch.float16,
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct")
# Load LoRA adapters
model = PeftModel.from_pretrained(base_model, "coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling")
# Generate tool calls
prompt = '''<|im_start|>system
You are a helpful assistant with access to the following tools:
[{"type": "function", "function": {"name": "create_cell", ...}}]
<|im_end|>
<|im_start|>user
Add a code cell that prints hello<|im_end|>
<|im_start|>assistant
'''
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=64, use_cache=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training Details
| Parameter | Value |
|---|---|
| Epochs | 1 |
| Batch Size | 2 |
| Gradient Accumulation | 4 |
| Learning Rate | 2e-4 |
| LoRA Rank (r) | 16 |
| LoRA Alpha | 16 |
| Max Sequence Length | 4096 |
| Trainable Parameters | 18.5M (1.18%) |
Dataset
Training dataset contains 2,603 examples covering all 19 tools with various phrasings and edge cases.
License
Apache 2.0
Acknowledgements
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for coconut495/qwen2.5-coder-1.5b-cellsistant-tool-calling
Base model
Qwen/Qwen2.5-1.5B Finetuned
Qwen/Qwen2.5-Coder-1.5B Finetuned
Qwen/Qwen2.5-Coder-1.5B-Instruct