Instructions to use josoroma/gemma-4-codigo-trabajo-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 josoroma/gemma-4-codigo-trabajo-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 josoroma/gemma-4-codigo-trabajo-gguf:BF16 # Run inference directly in the terminal: llama cli -hf josoroma/gemma-4-codigo-trabajo-gguf:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf josoroma/gemma-4-codigo-trabajo-gguf:BF16 # Run inference directly in the terminal: llama cli -hf josoroma/gemma-4-codigo-trabajo-gguf:BF16
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 josoroma/gemma-4-codigo-trabajo-gguf:BF16 # Run inference directly in the terminal: ./llama-cli -hf josoroma/gemma-4-codigo-trabajo-gguf:BF16
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 josoroma/gemma-4-codigo-trabajo-gguf:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf josoroma/gemma-4-codigo-trabajo-gguf:BF16
Use Docker
docker model run hf.co/josoroma/gemma-4-codigo-trabajo-gguf:BF16
- LM Studio
- Jan
- vLLM
How to use josoroma/gemma-4-codigo-trabajo-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "josoroma/gemma-4-codigo-trabajo-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": "josoroma/gemma-4-codigo-trabajo-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/josoroma/gemma-4-codigo-trabajo-gguf:BF16
- Ollama
How to use josoroma/gemma-4-codigo-trabajo-gguf with Ollama:
ollama run hf.co/josoroma/gemma-4-codigo-trabajo-gguf:BF16
- Unsloth Desktop
- Docker Model Runner
How to use josoroma/gemma-4-codigo-trabajo-gguf with Docker Model Runner:
docker model run hf.co/josoroma/gemma-4-codigo-trabajo-gguf:BF16
- Lemonade
How to use josoroma/gemma-4-codigo-trabajo-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull josoroma/gemma-4-codigo-trabajo-gguf:BF16
Run and chat with the model
lemonade run user.gemma-4-codigo-trabajo-gguf-BF16
List all available models
lemonade list
- Atomic Chat
Gemma 4 Cรณdigo de Trabajo GGUF
This repository contains GGUF artifacts for a Gemma 4 31B instruction model fine-tuned on examples related to the Cรณdigo de Trabajo de Costa Rica.
The model is intended to run locally with GGUF-compatible tools such as Ollama, llama.cpp, and other local inference runtimes.
Model Summary
- Model name:
gemma-4-codigo-trabajo-gguf - Base model:
unsloth/gemma-4-31B-it - Format: GGUF
- Main quantization:
Q4_K_M - Language: Spanish
- Domain: Costa Rican labor law
- Primary use case: Educational and informational answers about the Cรณdigo de Trabajo de Costa Rica
- Fine-tuning method: LoRA with Unsloth
- Local Ollama model name used during testing:
codigo-trabajo-cr
Files
This repository includes:
gemma-4-31b-it.Q4_K_M.gguf
gemma-4-31b-it.BF16-mmproj.gguf
Modelfile
The main text model file is:
gemma-4-31b-it.Q4_K_M.gguf
The BF16-mmproj file is included because it was produced during the GGUF export workflow.
Intended Use
This model is intended for Spanish-language informational assistance about Costa Rican labor-law topics, including:
- Rights and obligations of employers and workers
- Employment contracts
- Work schedules
- Overtime
- Rest periods
- Salaries
- Aguinaldo
- Vacations
- Dismissal causes
- Severance-related concepts
Important Legal Disclaimer
This model is not a lawyer and does not provide legal advice.
Its outputs should be treated as educational and informational only. For real legal cases, disputes, employment decisions, litigation, or formal legal interpretation, consult a qualified Costa Rican labor lawyer or the relevant public authority.
How to Use with Ollama
You can run the GGUF directly from Hugging Face with Ollama:
ollama run hf.co/josoroma/gemma-4-codigo-trabajo-gguf:Q4_K_M
If you download the GGUF manually, create a local Modelfile like this:
FROM ./gemma-4-31b-it.Q4_K_M.gguf
PARAMETER temperature 0.2
PARAMETER top_p 0.95
SYSTEM "Eres un asistente especializado en el Cรณdigo de Trabajo de Costa Rica. Responde en espaรฑol."
Then create and run the local Ollama model:
ollama create codigo-trabajo-cr -f Modelfile
ollama run codigo-trabajo-cr
Training Data
The model was fine-tuned using a JSONL dataset built around the Cรณdigo de Trabajo de Costa Rica.
The training rows used fields such as:
instruction
input
output
Additional traceability fields were kept in the dataset, including:
source_quote
source_url
law_code
article
chunk_id
dataset_type
These traceability fields were useful for auditing the dataset, but they were not necessarily injected into every training prompt.
Training Procedure
The training workflow used:
- Kaggle for the initial LoRA fine-tuning
- Unsloth for loading and fine-tuning Gemma 4 31B
SFTTrainerfor supervised fine-tuning- Response-only training with
train_on_responses_only - RunPod A100 80GB for the merge and GGUF export
- llama.cpp tooling through the Unsloth GGUF export path
The LoRA configuration used a text-only setup:
finetune_vision_layers = False
finetune_language_layers = True
finetune_attention_modules = True
finetune_mlp_modules = True
r = 8
lora_alpha = 8
lora_dropout = 0
bias = none
The trainer configuration included:
per_device_train_batch_size = 1
gradient_accumulation_steps = 4
warmup_steps = 5
max_steps = 60
learning_rate = 2e-4
optim = adamw_8bit
weight_decay = 0.001
lr_scheduler_type = linear
seed = 3407
Conversion and Export
The workflow produced:
gemma_4_lora/
Then the LoRA adapter was merged into a Hugging Face-format model on RunPod:
/workspace/gemma-4-codigo-trabajo-finetune/
Then the model was exported to GGUF:
/workspace/gemma-4-codigo-trabajo-gguf_gguf/gemma-4-31b-it.Q4_K_M.gguf
The final GGUF export was uploaded to this repository.
Local Test
The model was tested locally with Ollama on Apple Silicon.
The local test used:
ollama create codigo-trabajo-cr -f /tmp/Modelfile.gemma4
ollama run codigo-trabajo-cr
A first sanity check asked:
who are you?
The model responded in Spanish and identified itself as an assistant specialized in the Cรณdigo de Trabajo de Costa Rica.
Limitations
This model may:
- Hallucinate legal details
- Omit relevant exceptions
- Misread or oversimplify Costa Rican labor-law provisions
- Give outdated answers if the law changes
- Fail to cite exact articles unless prompted or externally grounded
- Produce answers that require verification against the official legal text
Do not use this model as the only source for legal decisions.
Recommended Evaluation
Before relying on this model, evaluate it against article-specific questions and compare outputs against the source law.
Recommended checks:
- Article-level factual accuracy
- Exact citation behavior
- Hallucination rate
- Handling of ambiguous labor-law questions
- Ability to say when it does not know
- Consistency across repeated prompts
- Comparison against official Costa Rican legal sources
Out-of-Scope Use
This model is not intended for:
- Formal legal advice
- Court filings
- Employment litigation strategy
- Replacing a lawyer
- Automated legal decision-making
- High-stakes HR decisions without human legal review
Acknowledgements
This project used:
- Gemma 4 31B instruction model
- Unsloth
- Kaggle
- RunPod
- llama.cpp
- Ollama
- Hugging Face Hub
Model Card Author
Created by josoroma.
Status
The model plumbing is complete: LoRA fine-tuning, merge, GGUF export, Hugging Face upload, Ollama import, and local inference all worked.
The next step is evaluation and dataset-quality improvement.
- Downloads last month
- 15
4-bit