Text Generation
Transformers
Safetensors
GGUF
MLX
English
gemma2
unsloth
gemma
conversational
text-generation-inference
Instructions to use TeunS/Geert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TeunS/Geert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TeunS/Geert") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TeunS/Geert") model = AutoModelForCausalLM.from_pretrained("TeunS/Geert", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use TeunS/Geert with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("TeunS/Geert") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TeunS/Geert 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 TeunS/Geert:F16 # Run inference directly in the terminal: llama cli -hf TeunS/Geert:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TeunS/Geert:F16 # Run inference directly in the terminal: llama cli -hf TeunS/Geert:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf TeunS/Geert:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf TeunS/Geert:F16
Use Docker
docker model run hf.co/TeunS/Geert:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use TeunS/Geert with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TeunS/Geert" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TeunS/Geert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TeunS/Geert:F16
- SGLang
How to use TeunS/Geert 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 "TeunS/Geert" \ --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": "TeunS/Geert", "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 "TeunS/Geert" \ --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": "TeunS/Geert", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use TeunS/Geert with Ollama:
ollama run hf.co/TeunS/Geert:F16
- Unsloth Desktop
- MLX LM
How to use TeunS/Geert with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "TeunS/Geert"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "TeunS/Geert" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TeunS/Geert", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use TeunS/Geert with Docker Model Runner:
docker model run hf.co/TeunS/Geert:F16
- Lemonade
How to use TeunS/Geert with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TeunS/Geert:F16
Run and chat with the model
lemonade run user.Geert-F16
List all available models
lemonade list
- Atomic Chat
|
Download README.md from TeunS/Geert: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/TeunS/Geert/resolve/refs%2Fpr%2F1/README.md
- Command line
-
hf download hf://TeunS/Geert@refs/pr/1/README.md
-
curl -L -o README.md https://huggingface.co/TeunS/Geert/resolve/refs%2Fpr%2F1/README.md
1.2 kB
metadata
base_model: mlx-community/gemma-2-9b-it-4bit
library_name: transformers
license: gemma
pipeline_tag: text-generation
tags:
- conversational
- mlx
- mlx
extra_gated_heading: Access Gemma on Hugging Face
extra_gated_prompt: >-
To access Gemma on Hugging Face, you’re required to review and agree to
Google’s usage license. To do this, please ensure you’re logged in to Hugging
Face and click below. Requests are processed immediately.
extra_gated_button_content: Acknowledge license
TeunS/Geert
The Model TeunS/Geert was converted to MLX format from mlx-community/gemma-2-9b-it-4bit using mlx-lm version 0.19.3.
Use with mlx
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("TeunS/Geert")
prompt="hello"
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)