iamtarun/python_code_instructions_18k_alpaca
Viewer • Updated • 18.6k • 21.5k • 347
How to use xtremecoder/Qwen2.5-Coder-7B-Instruct-Python-bnb-4bit with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("xtremecoder/Qwen2.5-Coder-7B-Instruct-Python-bnb-4bit", device_map="auto")How to use xtremecoder/Qwen2.5-Coder-7B-Instruct-Python-bnb-4bit with Unsloth Studio:
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 xtremecoder/Qwen2.5-Coder-7B-Instruct-Python-bnb-4bit to start chatting
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 xtremecoder/Qwen2.5-Coder-7B-Instruct-Python-bnb-4bit to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for xtremecoder/Qwen2.5-Coder-7B-Instruct-Python-bnb-4bit to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="xtremecoder/Qwen2.5-Coder-7B-Instruct-Python-bnb-4bit",
max_seq_length=2048,
)Fine-tuned the Qwen2.5 Coder 7B model for python code output.
From testing, the main difference is that the fine-tuned model directly generates code as output without additional text explanations and "fluff". The generated code itself is also different from the base model, sometimes more efficient than the original, but code quality doesn't always look to be as good as the original -- likely a function of limitated training datasets.