
# ๐ธ bloomee-v1-clm-nasasmd-granite4.1-3b
**Granite 4.1 3B, fine-tuned to answer flowering-phenology questions with NDVI tool calls**
*The full model โ adapter already folded in, nothing to attach at load time*
[](https://huggingface.co/ibm-granite/granite-4.1-3b)
[](#-files)
[](https://huggingface.co/bloomee-app/bloomee-v1-clm-nasasmd-granite4.1-3b-adapter)
[](https://huggingface.co/datasets/bloomee-app/bloomee-sft-nasasmd-grounded-5m)
[](LICENSE)
**๐ Part of the Bloomee platform โ NASA Space Apps Challenge 2025**
Built by [Team Ganespace](https://www.spaceappschallenge.org/2025/find-a-team/ganespace/) for [Bandung, Indonesia](https://www.spaceappschallenge.org/2025/local-events/bandung/)
---
## ๐ About
This is the **merged model**: the QLoRA adapter
[`bloomee-v1-clm-nasasmd-granite4.1-3b-adapter`](https://huggingface.co/bloomee-app/bloomee-v1-clm-nasasmd-granite4.1-3b-adapter)
folded into [`ibm-granite/granite-4.1-3b`](https://huggingface.co/ibm-granite/granite-4.1-3b) and
saved as ordinary fp16 weights. Load it with plain `transformers` โ no `peft`, no separate base-model
download.
It specialises Granite for the [Bloomee](https://bloomee.earth/) agent: given a question about
whether flowers are blooming somewhere, decide **which NDVI tool to call and with what arguments**,
then report the result plainly.
It was distilled from a larger teacher (`granite-4.1-8b`) driven through the *production* agent graph
โ the same retrieval node, the same four tools, the same prompt โ so what it learned is how the
application actually behaves rather than a reimplementation of it.
**If you are fine-tuning further, start from the adapter, not from here.** Merging a 4-bit-trained
adapter into fp16 weights is mildly lossy; the adapter is the exact artifact and this is the
convenient one.
---
## ๐ Usage
```bash
pip install torch transformers
python inference.py
```
```python
import json, torch
from pathlib import Path
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL = "bloomee-app/bloomee-v1-clm-nasasmd-granite4.1-3b"
tokenizer = AutoTokenizer.from_pretrained(MODEL)
model = AutoModelForCausalLM.from_pretrained(MODEL, dtype=torch.bfloat16, device_map="auto")
tools = json.loads(Path("tools.json").read_text())
messages = [
{"role": "system", "content": Path("system_prompt.txt").read_text()},
{"role": "user", "content": "What is the NDVI for japan_cherry today?"},
]
text = tokenizer.apply_chat_template(
messages, tools=tools, tokenize=False, add_generation_prompt=True
)
```
### โ ๏ธ Three things that are not optional
| | Why |
|---|---|
| **Pass `tools=`** | Granite's chat template renders the four schemas into a ~400-token block inside the system message. Every training row contained it. Omit it and the model sees a prompt shape it has never encountered. |
| **Use `system_prompt.txt` verbatim** | It is the trained prompt, byte for byte. A paraphrase is a different prompt. `inference.py` checks its SHA-256 and refuses to run if it drifts. |
| **Decode greedily** | The model was evaluated at temperature 0. Sampling makes tool arguments non-reproducible. |
The four tools it knows, by exact name:
```
current_time
list_regions_regions_get
predict_ndvi_predict__region__get
forecast_ndvi_predict__region__forecast_get
```
Tool calls come back Hermes-style, as `
**๐ธ Bloomee โ Unveiling Earth's Flowering Rhythms Through Space and Time ๐ธ**
*Built with โค๏ธ by Team Ganespace for NASA Space Apps Challenge 2025*