lantern-1.7b / README.md
visproj's picture
Rename lantern-1.7b-README.md to README.md
4fc0bbe verified
|
Raw History Blame Contribute Delete
3.08 kB
---
license: apache-2.0
base_model: Qwen/Qwen3-1.7B
datasets:
- visproj/lantern-episodes
pipeline_tag: text-generation
library_name: transformers
tags:
- agents
- tool-use
- distillation
- nethack
- minihack
---
# Lantern-1.7B
A 1.7B model that plays dungeon levels by calling tools, distilled from [Beam](https://huggingface.co/reflection/Beam-1.0-501B-A23B). It's the student half of [Lantern](https://huggingface.co/spaces/visproj/lantern).
## How it was made
- **Base model:** [Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B) (Apache-2.0).
- **Teacher:** Beam 1.0 by Reflection (Apache-2.0). Beam's model card states that Reflection doesn't prohibit distillation or using its outputs to train other models.
- **Data:** every Beam call from the winning episodes of the Lantern benchmark: 1,031 examples from 58 episodes across 8 MiniHack levels. Each example is the exact system prompt and observation Beam saw, and the tool calls it made (`act` with a list of moves, and `write_notes`). Only episodes with the current prompt version are used, and runs where a person coached the agent are left out. Data: [visproj/lantern-episodes](https://huggingface.co/datasets/visproj/lantern-episodes).
- **Training:** supervised fine-tuning with TRL, loss on the completion only, 3 epochs, learning rate 1e-5 (cosine), effective batch size 16, bf16, on one A100. Final training loss 0.37. Qwen3's thinking mode is turned off: the student answers with a tool call directly, without Beam's reasoning.
## Results
Same 8 MiniHack levels × 5 seeds, same prompt and tools, no journal:
| Model | Wins |
|---|---|
| Beam 1.0 (501B, teacher) | 23 / 40 |
| **Lantern-1.7B** | **11 / 40** |
| Qwen3-1.7B, untrained | 2 / 40 |
Per level, the student won Small Room 5/5, Room with Monsters 2/5, Memento 2/5, Key Room 1/5 and Corridors 1/5, and none of River Crossing, Maze Walk or Hide and Seek. Full per-level tables are in the [Space README](https://huggingface.co/spaces/visproj/lantern).
## How to use it
The model expects Lantern's prompt format and tool schema. Both are in the dataset: each episode's `start` event holds the exact system prompt and tool schema, and each `turn` event holds the observation prompt the model saw.
Serve it with vLLM and send requests in that format, with thinking turned off:
```bash
vllm serve visproj/lantern-1.7b --enable-auto-tool-choice --tool-call-parser hermes
```
Pass `{"chat_template_kwargs": {"enable_thinking": false}}` in the request body. The model replies with `act` or `write_notes` tool calls.
## Limitations
- It learned only from Beam's wins, so it has seen far fewer examples of recovering from mistakes than of clean play.
- It doesn't reason before acting the way Beam does, which matters most on the long levels.
- It's trained on Lantern's exact observation format. Other prompts or games will need retraining.
- 1,031 examples is a small dataset. Treat this as a proof of concept.
## License
Apache-2.0, as a fine-tune of Qwen3-1.7B (Apache-2.0). Changes from the base model are described under "How it was made".