Downloads · 30 days
11
5% of all-time downloads
hipnologo/garras
garras is a machine learning model from hipnologo. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
For models under 1B parameters, Q8 is the recommended quantization. Q4 is too lossy at this scale and noticeably degrades output quality.
Downloads · 30 days
11
5% of all-time downloads
All-time downloads
232
Public
Parameters
111M
796 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors445 MB · 56%
From the Hugging Face model README
| File | Format | Size | Use Case |
|---|---|---|---|
model.safetensors | SafeTensors | ~445 MB | HuggingFace / Transformers |
garras-F16.gguf | GGUF F16 | ~226 MB | Full precision, Ollama / llama.cpp |
garras-Q8_0.gguf | GGUF Q8 | ~130 MB | ⭐ Recommended for local inference |
Modelfile-f16 | Ollama | — | Modelfile for F16 variant |
Modelfile-q8 | Ollama | — | Modelfile for Q8 variant |
For models under 1B parameters, Q8 is the recommended quantization. Q4 is too lossy at this scale and noticeably degrades output quality.
Garras is a standard GPT-2 decoder-only transformer with pre-norm layer normalization and weight tying between the token embedding and the language model head.
| Hyperparameter | Value |
|---|---|
Layers (n_layer) | 12 |
Attention heads (n_head) | 12 |
Embedding dim (n_embd) | 768 |
| Sequence length | 2,048 |
| Vocab size | 32,000 |
| Dropout | 0.1 |
| Activation | GELU |
A custom bilingual BPE tokenizer trained on samples from all four data domains, ensuring proper subword coverage for both English and Portuguese.
Special tokens:
| Token | Purpose |
|---|---|
| `<\ | endoftext\ |
| `<\ | padding\ |
| `<\ | im_start\ |
| `<\ | im_end\ |
| `<\ | system\ |
| `<\ | user\ |
| `<\ | assistant\ |
| `<\ | poesia\ |
| `<\ | ensaio\ |
Garras was pretrained on a curated mix of four prose/web streams. No QA pairs or instruction data were used during pretraining — those are reserved for fine-tuning.
| Domain | Weight | Datasets | Purpose |
|---|---|---|---|
| General English | 50% | FineWeb (CC-MAIN-2024-10), ML-ArXiv-Papers | High-quality filtered web + academic prose |
| Brazilian Portuguese | 30% | Portuguese-PD, ClassiCC-PT | Bilingual balance — Garras's core differentiator |
| Multilingual bridge | 10% | mC4 (pt), VeraCruz PT-BR | EN↔PT vocabulary overlap, reduces code-switching |
| EN Academic | 10% | peS2o (Semantic Scholar) | Structured reasoning patterns |
| Hyperparameter | Value |
|---|---|
| Optimizer | AdamW |
| Learning rate | 3e-4 |
| LR schedule | Cosine with warmup |
| Warmup steps | 2,000 |
| Weight decay | 0.1 |
| Max gradient norm | 1.0 |
| Batch size | 16 × 4 grad accum × 2048 seq = 131K tokens/step |
| Total tokens | 2.2B |
| Precision | fp16 mixed precision |
| Hardware | 1× NVIDIA A100 40GB (Google Colab) |
Garras is designed as a base model. The following fine-tuning stages are planned:
| Stage | Datasets | Status |
|---|---|---|
| Instruction + Chat | UltraChat 200K, Aya (PT), OpenHermes | 🔜 Planned |
| Domain specialization | KisanVaani, CROP, Bible QA, Theology QA | 🔜 Planned |
| Author voice | Custom poetry + essays with `<\ | poesia\ |
The GGUF files were produced using llama.cpp's convert_hf_to_gguf.py. The custom BPE tokenizer required a patch to get_vocab_base_pre() to register the tokenizer hash — it maps to "gpt2" pre-tokenizer type since both use ByteLevel encoding.
The Modelfiles include tuned sampling parameters for small model inference:
| Parameter | Value | Purpose |
|---|---|---|
temperature | 0.85 | Slightly creative, avoids greedy repetition |
top_k | 40 | Cuts noise from low-quality tokens |
top_p | 0.92 | Nucleus sampling threshold |
repeat_penalty | 1.35 | Prevents loops |
repeat_last_n | 128 | Look-back window for repeat penalty |
num_predict | 512 | Caps generation length |
tfs_z | 0.95 | Tail-free sampling |
typical_p | 0.95 | Locally typical sampling |
@misc{garras2025,
author = {hipnologo},
title = {Garras: A Bilingual English/Portuguese LLM Trained from Scratch},
year = {2025},
publisher = {HuggingFace},
url = {https://huggingface.co/hipnologo/garras}
}
hipnologo — GitHub
Built with ❤️ and 🐾 """
api = HfApi() api.upload_file( path_or_fileobj=readme_content.encode("utf-8"), path_in_repo="README.md", repo_id=HF_REPO_NAME, ) print(f"✅ Model card updated → https://huggingface.co/{HF_REPO_NAME}")