Text Classification
Transformers
Safetensors
English
gemma4
image-text-to-text
decision-model
classification
calibration
routing
guardrails
vision
multimodal
baseten
Instructions to use baselabs/groundhog-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use baselabs/groundhog-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="baselabs/groundhog-1")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("baselabs/groundhog-1") model = AutoModelForMultimodalLM.from_pretrained("baselabs/groundhog-1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from baselabs/groundhog-1: direct link, hf CLI and curl.
- Browser
- Download file 5.33 kB
-
https://huggingface.co/baselabs/groundhog-1/resolve/main/README.md
- Command line
-
hf download hf://baselabs/groundhog-1/README.md
-
curl -L -o README.md https://huggingface.co/baselabs/groundhog-1/resolve/main/README.md
5.33 kB
| license: other | |
| license_name: mit-and-apache-2.0 | |
| license_link: LICENSE | |
| library_name: transformers | |
| base_model: google/gemma-4-26B-A4B-it | |
| base_model_relation: finetune | |
| pipeline_tag: text-classification | |
| language: | |
| - en | |
| tags: | |
| - decision-model | |
| - classification | |
| - calibration | |
| - routing | |
| - guardrails | |
| - vision | |
| - multimodal | |
| - baseten | |
| <div align="center"> | |
| <img | |
| src="https://huggingface.co/baselabs/groundhog-1/resolve/main/assets/banner.png" | |
| alt="Baseten groundhog-1 decision model" | |
| style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;" | |
| /> | |
| <div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;"> | |
| <a href="https://www.baseten.co/library/groundhog-1/"><strong>Try on Baseten</strong></a> | |
| </div> | |
| </div> | |
| # groundhog-1 | |
| groundhog-1 is a 26B parameter mixture-of-experts **decision model** (about 4B active parameters per token) post-trained from [Gemma-4-26B-A4B](https://huggingface.co/google/gemma-4-26B-A4B-it) by Base Labs at Baseten. | |
| Provide the model a state (text, optionally with images) and a set of questions and it will return a calibrated probability for every option, | |
| answering all questions from **one shared-prefix prefill**, without generating text. | |
| - **Long documents at a small-model price**: trained on sequences up to 131,072 tokens and priced like elephant-1. | |
| - **Same training data and recipe family as bison-1**, the #1 decision model on the Artificial Analysis Decision Index v2.1. | |
| For the highest accuracy, see the dense 31B sibling [bison-1](https://huggingface.co/baselabs/bison-1). | |
| ## 🗒️ Model Details | |
| | Model | Parameters | Description | | |
| |---|---|---| | |
| | [Gemma-4-26B-A4B](https://huggingface.co/google/gemma-4-26B-A4B-it) | 26B (about 4B active) | General-purpose base model | | |
| | **[groundhog-1](https://huggingface.co/baselabs/groundhog-1)** | 26B (about 4B active) | Post-trained for single-pass, calibrated decisions | | |
| | [bison-1](https://huggingface.co/baselabs/bison-1) | 31B | Dense sibling, highest accuracy | | |
| - **Inputs**: text and images | |
| - **Training**: full fine-tune of the language model on text and image decisions; the vision encoder, expert router, norms and embeddings are frozen | |
| - **Attention**: block-bidirectional mask on full-attention layers; sliding-window layers stay causal. | |
| - **Max sequence length**: 131,072 tokens | |
| ## 🏃 How to use | |
| ### Baseten Model APIs | |
| groundhog-1 is available on [Baseten Model APIs](https://www.baseten.co/library/groundhog-1/) as `decision-models/baseten-groundhog-latest`, at $0.035 per 1M tokens. It uses the same API as mammoth-1 and elephant-1, and the endpoint accepts text and image inputs. | |
| ### Request format | |
| A request carries one `state` and any number of `questions`. Every question is answered in the same call. | |
| ```python | |
| questions = { | |
| "refund": {"type": "noul", "instructions": "Is the customer asking for a refund?"}, | |
| "team": { | |
| "type": "choice", | |
| "instructions": "Which team should handle this?", | |
| "criteria": {"billing": "Charges, refunds, invoices", | |
| "technical": "App or site faults", | |
| "fraud": "Suspected unauthorised use"}, | |
| }, | |
| "urgency": { | |
| "type": "score", | |
| "instructions": "How urgent is this?", | |
| "criteria": ["Can wait", "Today", "Blocking the customer now"], | |
| }, | |
| } | |
| request = {"state": "I was charged twice this month, please refund one of them.", "questions": questions} | |
| ``` | |
| | `type` | `criteria` | answer fields | | |
| |---|---|---| | |
| | `noul`: yes or no | optional | `noul`: P(yes) | | |
| | `choice`: one of named options | `{name: description}` | `choice`, `probabilities` | | |
| | `score`: ordered levels | list of levels, lowest first | `score`, `probabilities` | | |
| Requests longer than the trained length limits are refused, not truncated. | |
| ## 📊 Performance | |
| ### Long context (our run) | |
| | Benchmark | groundhog-1 | | |
| |---|---:| | |
| | LongMemEval M, 128k tokens | 77.4 | | |
| | LongMemEval S, 128k tokens | 79.3 | | |
| groundhog-1 has not yet been scored on the Artificial Analysis Decision Index. | |
| ## 🔧 Training | |
| - **Data**: 6.71M decision examples (Mix 12): core decision skills, safety and abstention, judging and expert domains, document and long-context tasks, and public decision data, including public benchmark sets. | |
| - **Objective**: cross-entropy plus a Brier calibration term (λ = 1), with a trained "I don't know" option. About one example in seven carries a probability target instead of a single right answer. | |
| - **Recipe**: 1 epoch (5,621 steps), peak LR 3.95e-6, no weight decay, 3% warm-up, bf16, sequences up to 131,072 tokens. | |
| - **Hardware**: 16 nodes × 8 B200 (128 GPUs). | |
| ## License | |
| groundhog-1 is fine-tuned by Baseten from [Gemma 4 26B A4B IT](https://huggingface.co/google/gemma-4-26B-A4B-it), which is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). Baseten's modifications are released under the MIT License. Use of the model is subject to both licenses; see [LICENSE](LICENSE) and [NOTICE](NOTICE). | |
| ## Attribution | |
| Base model: Gemma 4 26B A4B IT, made available by Google LLC, licensed under the Apache License 2.0. Baseten modified the weights by further training. Gemma is a trademark of Google LLC. This model is not affiliated with or endorsed by Google. | |