Instructions to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF 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 ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
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 ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
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 ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
- Ollama
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with Ollama:
ollama run hf.co/ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with Docker Model Runner:
docker model run hf.co/ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
- Lemonade
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
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 ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF
GGUF quantizations of a LoRA fine-tune of microsoft/FastContext-1.0-4B-SFT (no longer available on the Hub), supervised fine-tuned on Salesforce/xlam-function-calling-60k.
Quantized from ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth. See that repository for the full-precision weights.
| Base model | microsoft/FastContext-1.0-4B-SFT (no longer available on the Hub) |
| Training data | Salesforce/xlam-function-calling-60k |
| Method | LoRA supervised fine-tuning via Unsloth + TRL |
Available quantizations
| File | Size |
|---|---|
fastcontext-4b-sft_base-function-calling-xlam-unsloth.q2_k.gguf |
1.67 GB |
fastcontext-4b-sft_base-function-calling-xlam-unsloth.q3_k_m.gguf |
2.08 GB |
fastcontext-4b-sft_base-function-calling-xlam-unsloth.q4_k_m.gguf |
2.50 GB |
fastcontext-4b-sft_base-function-calling-xlam-unsloth.q5_k_m.gguf |
2.89 GB |
fastcontext-4b-sft_base-function-calling-xlam-unsloth.q6_k.gguf |
3.31 GB |
fastcontext-4b-sft_base-function-calling-xlam-unsloth.q8_0.gguf |
4.28 GB |
Usage
llama.cpp
huggingface-cli download ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF fastcontext-4b-sft_base-function-calling-xlam-unsloth.q4_k_m.gguf --local-dir .
llama-cli -m fastcontext-4b-sft_base-function-calling-xlam-unsloth.q4_k_m.gguf -p "Explain gradient checkpointing in two sentences." -n 256
Ollama
echo 'FROM ./fastcontext-4b-sft_base-function-calling-xlam-unsloth.q4_k_m.gguf' > Modelfile
ollama create fastcontext-4b-sft_base-function-calling-xlam-unsloth-gguf -f Modelfile
ollama run fastcontext-4b-sft_base-function-calling-xlam-unsloth-gguf
Training configuration
| Setting | Value |
|---|---|
| LoRA rank (r) | 16 |
| LoRA alpha | 16 |
| Learning rate | 0.0002 |
| Epochs | 1 |
| Effective batch size | 8 (2 x 4 grad accum) |
| Max sequence length | 2048 |
| Base precision | 4-bit (QLoRA) |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
Observed training loss
Measured from our SLURM logs for this configuration. These are training-loss observations only — no downstream benchmark evaluation has been run on this model, so they should not be read as a quality claim.
| SLURM job | Steps | First loss | Final loss |
|---|---|---|---|
53225528 |
94,254 | 1.1628 | 0.8690 |
45169148 |
7,500 | 0.6742 | 0.1443 |
Limitations
- No benchmark evaluation has been run on this checkpoint. The only reported numbers are training-loss observations.
- Inherits the biases, knowledge cutoff and failure modes of the base model.
- Fine-tuned on a single instruction-following dataset; behaviour outside that distribution is untested.
- LoRA adapters were merged into the base weights, so the merged model cannot be detached from this fine-tune.
Reproducing
Trained by notebooks/xlam_function_calling_fastcontext-4b-sft_unsloth.ipynb, executed non-interactively with
papermill on a SLURM H100 partition (Unsloth + TRL, LoRA).
Card generated from the training run's own configuration and logs by
scripts/generate_hub_model_card.py.
- Downloads last month
- 400
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for ermiaazarkhalili/FastContext-4B-SFT_base-Function-Calling-xLAM-Unsloth-GGUF
Base model
microsoft/FastContext-1.0-4B-SFT