Instructions to use emrecandan0/Qwen2.5-MCP-Tool-Calling with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use emrecandan0/Qwen2.5-MCP-Tool-Calling with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-Coder-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "emrecandan0/Qwen2.5-MCP-Tool-Calling") - Transformers
How to use emrecandan0/Qwen2.5-MCP-Tool-Calling with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="emrecandan0/Qwen2.5-MCP-Tool-Calling") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("emrecandan0/Qwen2.5-MCP-Tool-Calling", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use emrecandan0/Qwen2.5-MCP-Tool-Calling with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "emrecandan0/Qwen2.5-MCP-Tool-Calling" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "emrecandan0/Qwen2.5-MCP-Tool-Calling", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/emrecandan0/Qwen2.5-MCP-Tool-Calling
- SGLang
How to use emrecandan0/Qwen2.5-MCP-Tool-Calling 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 "emrecandan0/Qwen2.5-MCP-Tool-Calling" \ --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": "emrecandan0/Qwen2.5-MCP-Tool-Calling", "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 "emrecandan0/Qwen2.5-MCP-Tool-Calling" \ --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": "emrecandan0/Qwen2.5-MCP-Tool-Calling", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use emrecandan0/Qwen2.5-MCP-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 emrecandan0/Qwen2.5-MCP-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 emrecandan0/Qwen2.5-MCP-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 emrecandan0/Qwen2.5-MCP-Tool-Calling to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="emrecandan0/Qwen2.5-MCP-Tool-Calling", max_seq_length=2048, ) - Docker Model Runner
How to use emrecandan0/Qwen2.5-MCP-Tool-Calling with Docker Model Runner:
docker model run hf.co/emrecandan0/Qwen2.5-MCP-Tool-Calling
๐ ๏ธ Fine-tuned Tool-Calling LLM (LoRA + Merged) for Geospatial Operations
This repository contains a fine-tuned Large Language Model (LLM) capable of structured tool/function calling, optimized for integration with backend services such as Model Context Protocol (MCP) for geospatial, file analysis, and automation tasks.
Note:This repo only has the lora adapter of the model.You can merge it with the Qwen2.5-Coder-1.5B-Instruct base model.
Model Structure
lora_model/
LoRA (Low-Rank Adaptation) adapters and tokenizer files for efficient fine-tuning and inference.
adapter_model.safetensors,adapter_config.jsonโ LoRA adapter weights and config.tokenizer.json,tokenizer_config.json,special_tokens_map.json,vocab.jsonโ Tokenizer files.chat_template.jinja,merges.txt,added_tokens.jsonโ (If applicable) chat formatting and tokenization.
merged_model/
The base model merged with LoRA adapters for direct use without extra configuration.
model-00001-of-00002.safetensors,model-00002-of-00002.safetensorsโ Model weights (split).config.json,generation_config.jsonโ Model and generation configs.tokenizer.json,tokenizer_config.json,special_tokens_map.json,vocab.jsonโ Tokenizer files.chat_template.jinja,merges.txt,added_tokens.jsonโ (If applicable) chat formatting and tokenization.
How to Use
Loading the Merged Model
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("path/to/merged_model")
tokenizer = AutoTokenizer.from_pretrained("path/to/merged_model")
# Example inference
input_text = "Analyze the file C:/data/image.tif"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0]))
Loading with LoRA Adapter (Optional)
If you want to use the LoRA adapter separately:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained("your/base-model")
tokenizer = AutoTokenizer.from_pretrained("path/to/lora_model")
model = PeftModel.from_pretrained(base_model, "path/to/lora_model")
Example inference...
Intended Use Natural language to tool-calling JSON conversion for backend automation.
Geospatial and image operations via MCP or custom tools.
Easily extensible for new tool schemas.
Example Input/Output Prompt:
Crop the image C:/images/sample.tif to bounding box [xmin, ymin, xmax, ymax].
Model Output:
TOOL_NEEDED: crop_image
PARAMS: {"filepath": "C:/images/sample.tif", "minx": ..., "miny": ..., "maxx": ..., "maxy": ...}
Training Details
Fine-tuned for structured function-calling on domain-specific data.
Supports both merged and LoRA-adapter workflows.
For technical backend details, see the project repository.
Citation
@misc{finetuned_llm_mcp_2025, author = {ฤฐsmail Emre Candan}, title = {Fine-tuned Tool-Calling LLM (LoRA + Merged)}, year = {2025}, url = {https://github.com/EmreCandan0/fine-tuned-llm-tool-calling} }
- Downloads last month
- 1
Model tree for emrecandan0/Qwen2.5-MCP-Tool-Calling
Base model
Qwen/Qwen2.5-1.5B