Instructions to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="timbossm/qwen2.5-3B-sql-mgpu-bi-ft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("timbossm/qwen2.5-3B-sql-mgpu-bi-ft") model = AutoModelForCausalLM.from_pretrained("timbossm/qwen2.5-3B-sql-mgpu-bi-ft", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft # Run inference directly in the terminal: llama cli -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft # Run inference directly in the terminal: llama cli -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft # Run inference directly in the terminal: ./llama-cli -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft # Run inference directly in the terminal: ./build/bin/llama-cli -hf timbossm/qwen2.5-3B-sql-mgpu-bi-ft
Use Docker
docker model run hf.co/timbossm/qwen2.5-3B-sql-mgpu-bi-ft
- LM Studio
- Jan
- vLLM
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "timbossm/qwen2.5-3B-sql-mgpu-bi-ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "timbossm/qwen2.5-3B-sql-mgpu-bi-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/timbossm/qwen2.5-3B-sql-mgpu-bi-ft
- SGLang
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft 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 "timbossm/qwen2.5-3B-sql-mgpu-bi-ft" \ --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": "timbossm/qwen2.5-3B-sql-mgpu-bi-ft", "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 "timbossm/qwen2.5-3B-sql-mgpu-bi-ft" \ --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": "timbossm/qwen2.5-3B-sql-mgpu-bi-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft with Ollama:
ollama run hf.co/timbossm/qwen2.5-3B-sql-mgpu-bi-ft
- Unsloth Studio
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft 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 timbossm/qwen2.5-3B-sql-mgpu-bi-ft 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 timbossm/qwen2.5-3B-sql-mgpu-bi-ft to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for timbossm/qwen2.5-3B-sql-mgpu-bi-ft to start chatting
- Docker Model Runner
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft with Docker Model Runner:
docker model run hf.co/timbossm/qwen2.5-3B-sql-mgpu-bi-ft
- Lemonade
How to use timbossm/qwen2.5-3B-sql-mgpu-bi-ft with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull timbossm/qwen2.5-3B-sql-mgpu-bi-ft
Run and chat with the model
lemonade run user.qwen2.5-3B-sql-mgpu-bi-ft-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
timbossm/qwen2.5-3B-sql-mgpu-bi-ft
Эта модель представляет собой дальнейшее дообучение (fine-tuning) модели Ellbendls/Qwen-2.5-3b-Text_to_SQL для генерации SQL-запросов на основе инструкций на естественном языке и предоставленного контекста схемы базы данных.
Описание Модели
- Промежуточная базовая модель: Ellbendls/Qwen-2.5-3b-Text_to_SQL
- Эта модель, в свою очередь, является доработанной версией Qwen/Qwen2.5-3B-Instruct (3B параметров).
- Она была обучена на наборах данных
gretelai/synthetic_text_to_sqlиtimbossm/sql_bi__b_db.
- Финальное дообучение (данная модель): Модель
timbossm/qwen2.5-3B-sql-mgpu-bi-ftбыла дополнительно дообучена с использованием метода LoRA (Parameter-Efficient Fine-Tuning) на кастомном датасете (generated_sql_data_0-3000.jsonl). - Задача: Text-to-SQL (преобразование текста в SQL).
- Формат данных для финального дообучения: Модель обучалась на примерах, включающих:
- Контекст БД (
sql_context): DDL-скрипты (CREATE TABLE...) для описания структуры таблиц. - Инструкция (
sql_prompt): Запрос на естественном языке (например, "Выведи имена всех сотрудников старше 30"). - Целевой SQL (
sql): Правильный SQL-запрос, соответствующий инструкции и контексту.
- Контекст БД (
- Дополнительные метаданные кастомного датасета: Датасет также содержал информацию об отраслевом секторе (
industry_sector), теме (topic), сложности SQL (sql_complexity), SQL-концепциях (sql_concept) и типе задачи (sql_task_type), хотя эти поля напрямую не использовались как входные данные для модели во время обучения в формате ChatML.
Наборы данных
- Для промежуточной базовой модели (
Ellbendls/Qwen-2.5-3b-Text_to_SQL): - Для финального дообучения (данная модель):
- Кастомный датасет
dataset_sql_bi_b_db.jsonl
- Кастомный датасет
Назначение и Ограничения
- Предполагаемое использование: Генерация SQL-запросов для взаимодействия с базами данных, помощь в анализе данных, образовательные цели (обучение SQL). Модель ожидает на вход описание схемы БД и инструкцию на естественном языке.
- Не предназначено для: Генерации кода на других языках программирования (кроме SQL), ведения общих диалогов, выполнения сложных многоэтапных рассуждений, генерации запросов для сильно отличающихся диалектов SQL или NoSQL баз данных, если они не были представлены в обучающих данных.
- Ограничения:
- Качество генерации сильно зависит от качества и полноты предоставленного контекста схемы БД.
- Производительность на диалектах SQL, не представленных в обучающем датасете, не гарантируется.
- Модель наследует ограничения и потенциальные предвзятости базовых моделей (
Ellbendls/Qwen-2.5-3b-Text_to_SQL,Qwen/Qwen2.5-3B-Instruct) и данных, на которых они обучались.
Как Использовать
Важно: Эта модель (и ее базовая модель Ellbendls/Qwen-2.5-3b-Text_to_SQL) дообучалась с использованием специфического формата промпта, включающего контекст БД и инструкцию. Для получения наилучших результатов при инференсе следует использовать тот же формат.
Compute Infrastructure
Hardware
Обучение проводилось на GPU NVIDIA RTX 2000.
Software
- Python
- PyTorch
- Hugging Face
transformers - Hugging Face
datasets - Hugging Face
accelerate - Hugging Face
huggingface-hub
Citation
BibTeX:
@misc{qwen2.5-3B-sql-mgpu-bi-ft},
author = {Bosenko T.M},
title = {qwen2.5-3B-sql-mgpu-bi-ft},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/timbossm/sales-sql-finetuned-model}},
note = {Дообучено на материалах Лабораторного практикума МГПУ по языку SQL, 2025.}
}
APA:
timbossm. (2025). sales-sql-finetuned-model. Hugging Face. Retrieved from [https://huggingface.co/timbossm/qwen2.5-3B-sql-mgpu-bi-ft](https://huggingface.co/timbossm/qwen2.5-3B-sql-mgpu-bi-ft) (Дообучено на материалах Лабораторного практикума МГПУ по языку SQL, 2025).
Босенко, Т. М., Фролов, Ю. В. (2025). Лабораторный практикум по языку SQL: практикум*. МГПУ.
@misc{qwen2.5-3B,
title = {qwen2.5-3B-sql-mgpu-bi-ft},
url = {https://huggingface.co/timbossm/qwen2.5-3B-sql-mgpu-bi-ft},
author = {MGPU},
month = {April},
year = {2025}
}
- Downloads last month
- 30
Model tree for timbossm/qwen2.5-3B-sql-mgpu-bi-ft
Base model
Qwen/Qwen2.5-3B