Text Generation
GGUF
English
Romanian
llama.cpp
translation
en-ro
lora
gemma-3
12b
fine-tuned
Synthetic
fables
instruction-following
conversational
Instructions to use klusai/tf2-12b-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 klusai/tf2-12b-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 klusai/tf2-12b-gguf:F16 # Run inference directly in the terminal: llama cli -hf klusai/tf2-12b-gguf:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf klusai/tf2-12b-gguf:F16 # Run inference directly in the terminal: llama cli -hf klusai/tf2-12b-gguf: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 klusai/tf2-12b-gguf:F16 # Run inference directly in the terminal: ./llama-cli -hf klusai/tf2-12b-gguf: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 klusai/tf2-12b-gguf:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf klusai/tf2-12b-gguf:F16
Use Docker
docker model run hf.co/klusai/tf2-12b-gguf:F16
- LM Studio
- Jan
- vLLM
How to use klusai/tf2-12b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "klusai/tf2-12b-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": "klusai/tf2-12b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/klusai/tf2-12b-gguf:F16
- Ollama
How to use klusai/tf2-12b-gguf with Ollama:
ollama run hf.co/klusai/tf2-12b-gguf:F16
- Unsloth Desktop
- Docker Model Runner
How to use klusai/tf2-12b-gguf with Docker Model Runner:
docker model run hf.co/klusai/tf2-12b-gguf:F16
- Lemonade
How to use klusai/tf2-12b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull klusai/tf2-12b-gguf:F16
Run and chat with the model
lemonade run user.tf2-12b-gguf-F16
List all available models
lemonade list
- Atomic Chat
Download handler.py from klusai/tf2-12b-gguf: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/klusai/tf2-12b-gguf/resolve/main/handler.py
- Command line
-
hf download hf://klusai/tf2-12b-gguf/handler.py
-
curl -L -o handler.py https://huggingface.co/klusai/tf2-12b-gguf/resolve/main/handler.py
1.07 kB
| from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig | |
| import torch | |
| class EndpointHandler: | |
| def __init__(self): | |
| model_id = "klusai/tf2-12b" | |
| quant = BitsAndBytesConfig( | |
| load_in_4bit=True, | |
| bnb_4bit_quant_type="nf4", | |
| bnb_4bit_compute_dtype=torch.bfloat16, | |
| bnb_4bit_use_double_quant=True, | |
| ) | |
| self.tokenizer = AutoTokenizer.from_pretrained(model_id) | |
| self.model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| device_map="auto", | |
| quantization_config=quant, | |
| torch_dtype=torch.bfloat16, | |
| ) | |
| def __call__(self, payload: dict): | |
| prompt = payload.get("inputs") or payload.get("prompt", "") | |
| max_new = payload.get("max_new_tokens", 1024) | |
| inputs = self.tokenizer(prompt, return_tensors="pt").to(self.model.device) | |
| outputs = self.model.generate(**inputs, max_new_tokens=max_new) | |
| return {"generated_text": self.tokenizer.decode(outputs[0], skip_special_tokens=True)} | |