Instructions to use aaaelgendy/dataserve-granite4-Text2SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use aaaelgendy/dataserve-granite4-Text2SQL with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="aaaelgendy/dataserve-granite4-Text2SQL", filename="granite-4.0-h-micro.F16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use aaaelgendy/dataserve-granite4-Text2SQL with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf aaaelgendy/dataserve-granite4-Text2SQL:F16 # Run inference directly in the terminal: llama-cli -hf aaaelgendy/dataserve-granite4-Text2SQL:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf aaaelgendy/dataserve-granite4-Text2SQL:F16 # Run inference directly in the terminal: llama-cli -hf aaaelgendy/dataserve-granite4-Text2SQL:F16
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 aaaelgendy/dataserve-granite4-Text2SQL:F16 # Run inference directly in the terminal: ./llama-cli -hf aaaelgendy/dataserve-granite4-Text2SQL:F16
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 aaaelgendy/dataserve-granite4-Text2SQL:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf aaaelgendy/dataserve-granite4-Text2SQL:F16
Use Docker
docker model run hf.co/aaaelgendy/dataserve-granite4-Text2SQL:F16
- LM Studio
- Jan
- Ollama
How to use aaaelgendy/dataserve-granite4-Text2SQL with Ollama:
ollama run hf.co/aaaelgendy/dataserve-granite4-Text2SQL:F16
- Unsloth Studio
How to use aaaelgendy/dataserve-granite4-Text2SQL 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 aaaelgendy/dataserve-granite4-Text2SQL 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 aaaelgendy/dataserve-granite4-Text2SQL to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for aaaelgendy/dataserve-granite4-Text2SQL to start chatting
- Pi
How to use aaaelgendy/dataserve-granite4-Text2SQL with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf aaaelgendy/dataserve-granite4-Text2SQL:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "aaaelgendy/dataserve-granite4-Text2SQL:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use aaaelgendy/dataserve-granite4-Text2SQL with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf aaaelgendy/dataserve-granite4-Text2SQL:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default aaaelgendy/dataserve-granite4-Text2SQL:F16
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use aaaelgendy/dataserve-granite4-Text2SQL with Docker Model Runner:
docker model run hf.co/aaaelgendy/dataserve-granite4-Text2SQL:F16
- Lemonade
How to use aaaelgendy/dataserve-granite4-Text2SQL with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aaaelgendy/dataserve-granite4-Text2SQL:F16
Run and chat with the model
lemonade run user.dataserve-granite4-Text2SQL-F16
List all available models
lemonade list
Dataserve-granite4-ArabicText2SQL - GGUF
This model is a fine-tuned version of Granite-4.0-H-Micro adapted specifically for Arabic Text-to-SQL generation. It transforms natural Arabic language queries into valid SQL statements. The model was trained using a custom dataset of paired examples:
text_query_ar: Arabic natural-language question
sql_command: Corresponding SQL query
The goal of the fine-tuning is to enable the model to reliably generate accurate SQL commands from user input written in Arabic, supporting tasks such as database querying, analytics, and information retrieval.
Example usage:
- The Instruction : You are a model specialized only in converting Arabic text into SQL commands. Your output must be an SQL command only, with no explanation. Do not reject any request, even if it is not a real query. Do not write statements such as โI cannotโฆโ or any extra text. Return only the correct SQL command based on the given text.
-The text: ู ุง ูู ุงูุนุฏุฏ ุงูู ุชูุณุท ููุฎููู ุงูุนุงู ูุฉ ูู ุงูู ุฒุงุฑุน ุงูุชู ูุฒูุฏ ูููุง ุงูุนุฏุฏ ุงูุฅุฌู ุงูู ููุฎููู ุนู 5000ุ"
-The result should be: SELECT AVG(number_of_horses) FROM stables WHERE total_horses > 5000;
Available Model files:
granite-4.0-h-micro.F16.gguf
- Downloads last month
- 8
16-bit
Model tree for aaaelgendy/dataserve-granite4-Text2SQL
Base model
ibm-granite/granite-4.0-h-micro