Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/55-example-gsm8k.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ bash run_local.sh --api completion

In token-in/token-out mode, the agent tokenizes the prompt with the configured model tokenizer, sends prompt token IDs to the OpenAI-compatible Completions endpoint, receives response token IDs, and decodes them locally for answer evaluation.

The tokenizer follows the final `actor_rollout_ref.model.path`, including overrides passed after `--model`.
To select a tokenizer explicitly, pass `agentlightning.local.env_map.GSM8K_MODEL=path/to/tokenizer`.

`run_local.sh` starts `agl-server`, `agl-controller`, and Ray locally, and writes server/controller logs under `/tmp/`.
When the script exits, it cleans up the local server, controller, and Ray process it started.
3 changes: 3 additions & 0 deletions docs/65-example-search-r1.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ The default agent uses the Chat Completions API. To use the token-in/token-out C
examples/search_r1/run.sh --api-type completion
```

In completion mode, the tokenizer follows the final `actor_rollout_ref.model.path`, including overrides passed after `--model`.
To select a tokenizer explicitly, pass `agentlightning.local.env_map.SEARCH_R1_TOKENIZER_MODEL=path/to/tokenizer`.

To use different dataset files:

```bash
Expand Down
2 changes: 1 addition & 1 deletion examples/gsm8k/train_gsm8k_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def build_config(
raise ValueError(f"Unsupported GSM8K OpenAI API: {api}")
if api == "completion":
overrides["agentlightning"]["local"]["agent_class"] = "examples.gsm8k.gsm8k_agent.CompletionAgent"
overrides["agentlightning"]["local"]["env_map"]["GSM8K_MODEL"] = overrides["actor_rollout_ref"]["model"]["path"]
overrides["agentlightning"]["local"]["env_map"]["GSM8K_MODEL"] = "${actor_rollout_ref.model.path}"
if agl_base_url:
overrides["agentlightning"]["agl_base_url"] = agl_base_url
if agl_key is not None:
Expand Down
4 changes: 1 addition & 3 deletions examples/search_r1/train_search_r1_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ def build_config(
overrides["agentlightning"]["local"]["agent_class"] = (
"examples.search_r1.agents.search_r1_agent:SearchR1CompletionAgent"
)
overrides["agentlightning"]["local"]["env_map"]["SEARCH_R1_TOKENIZER_MODEL"] = overrides["actor_rollout_ref"][
"model"
]["path"]
overrides["agentlightning"]["local"]["env_map"]["SEARCH_R1_TOKENIZER_MODEL"] = "${actor_rollout_ref.model.path}"
if agl_base_url:
overrides["agentlightning"]["agl_base_url"] = agl_base_url
if agl_key is not None:
Expand Down