Instructions to use Denisijcu/vertexgemma 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 Denisijcu/vertexgemma 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 Denisijcu/vertexgemma:Q4_K_M # Run inference directly in the terminal: llama cli -hf Denisijcu/vertexgemma:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Denisijcu/vertexgemma:Q4_K_M # Run inference directly in the terminal: llama cli -hf Denisijcu/vertexgemma:Q4_K_M
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 Denisijcu/vertexgemma:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Denisijcu/vertexgemma:Q4_K_M
Use Docker
docker model run hf.co/Denisijcu/vertexgemma:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use Denisijcu/vertexgemma with Ollama:
ollama run hf.co/Denisijcu/vertexgemma:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Denisijcu/vertexgemma with Docker Model Runner:
docker model run hf.co/Denisijcu/vertexgemma:Q4_K_M
- Lemonade
How to use Denisijcu/vertexgemma with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Denisijcu/vertexgemma:Q4_K_M
Run and chat with the model
lemonade run user.vertexgemma-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Vertex-Gemma Chess (Gemma 2 2B, QLoRA, GGUF)
A small research experiment by Vertex Coders LLC (Denis Sanchez Leyva, Miami, FL): Gemma 2 2B IT fine-tuned with QLoRA to pick a chess move from a list of legal moves and answer in a fixed format. It was trained to be compared head-to-head against Denisijcu/vertexqwen (Qwen 2.5 3B) with the same data and the same recipe, in the Vertex Chess Arena project and the book Jaque al modelo.
This is not a strong chess engine. It learned the answer format very well and picks the reference move more often than the Qwen model, but it does not play well on its own. See Evaluation.
Links: code: Denisijcu/vertex-chess-arena Β· sister model: Denisijcu/vertexqwen Β· video: YouTube Β· play it: Space Β· book: [Jaque al Modelo] (https://a.co/d/0gveUzJa)_ .
Files
| File | What it is |
|---|---|
vertex-chess-gemma-q4_k_m.gguf |
Base + LoRA merged, quantized to q4_k_m (1.7 GB) |
Modelfile.gemma |
Ollama Modelfile with explicit Gemma template and stop tokens |
adapter/ |
The LoRA adapter (PEFT) for google/gemma-2-2b-it, used by the playable Space |
Prompt format
Gemma 2 has no system role. In training and in the arena, the system text goes at the start of the user message, followed by a blank line:
You are an elite chess grandmaster engine created by Vertex Coders. Analyze the FEN board state and the list of legal moves, then output the single strongest tactical move in both SAN and UCI formats.
Position FEN: <fen>
Legal moves (SAN): <comma-separated legal moves>
Select the best move.
Expected answer:
Best move: Nf3 (UCI: g1f3)
The included Modelfile also accepts a separate system message and merges it the same way.
Training
- Data: 5,000 positions (40% Lichess engine evaluations, 40% Lichess puzzles, 20%
agi-noobs/chess-sft-20k), validated with python-chess. - QLoRA with
transformers+peft+bitsandbytesonunsloth/gemma-2-2b-it-bnb-4bit: r=8, alpha=16, dropout 0, all attention and MLP projections. - lr 5e-5, 15 warmup steps, cosine, effective batch 8 (1Γ8), max length 384, fp16, eager attention,
adamw_torch, seed 42. - Loss on the answer only (prompt masked with -100).
- 625 steps (1 epoch) on an NVIDIA GTX 1660 Ti 6 GB: about 11 hours.
- Exported with Unsloth to GGUF
q4_k_m.
Evaluation
40 positions from the training set (format = answers Best move:; match = same move as the dataset):
| Model | Format | Match |
|---|---|---|
| Gemma 2 2B (this model) | 40/40 | 9/40 |
| Qwen 2.5 3B V3 (same recipe) | 39/40 | 4/40 |
10-game match, model choosing among all legal moves: Gemma 5.5 β Qwen V3 4.5 (9 draws by threefold repetition). Valid answers: Gemma 99.2%, Qwen 95.5%. In a 7-player round robin, every model with a move-filtering arbiter beat every model without it (9β0): with the filter, the differences between models disappear.
Use with Ollama
Download the files (about 1.7 GB), then register the model:
pip install -U huggingface_hub
hf download Denisijcu/vertexgemma vertex-chess-gemma-q4_k_m.gguf Modelfile.gemma --local-dir vertexgemma
cd vertexgemma
ollama create vertexgemma -f Modelfile.gemma
ollama run vertexgemma
Send the prompt exactly as in Prompt format, with the full list of legal moves. It was trained on this format only.
Limitations
- Trained on 5,000 positions, one epoch: enough to learn the answer format, not to play well.
- Evaluated only on positions from the training set; no held-out benchmark yet.
- Without a move filter, games tend to end in threefold repetition.
- The model only picks from the moves it is given. It does not check legality by itself: use
python-chessor similar.
License
Gemma is provided under and subject to the Gemma Terms of Use found at
ai.google.dev/gemma/terms. This model is a Model
Derivative of google/gemma-2-2b-it; its use is subject to those terms and to the
Gemma Prohibited Use Policy. See NOTICE.
- Downloads last month
- 29
4-bit