docs: sync documentation with post-v0.2 changes
This commit is contained in:
+85
-12
@@ -20,15 +20,53 @@ Benchmark configs inherit from `_base_/default.yaml` and override specific value
|
||||
|
||||
## Key Parameters
|
||||
|
||||
### Model
|
||||
### Model Backends
|
||||
|
||||
`optimizer_backend` controls reflection and skill editing;
|
||||
`target_backend` controls task rollout. The legacy `backend` field remains for
|
||||
backward compatibility, but explicit role fields are the clearest configuration.
|
||||
|
||||
```yaml
|
||||
model:
|
||||
backend: azure_openai # azure_openai | openai_chat | claude_code_exec | qwen
|
||||
optimizer: gpt-5.5 # Optimizer model (for reflection)
|
||||
target: gpt-5.5 # Target model (for rollout)
|
||||
backend: azure_openai # High-level compatibility label
|
||||
optimizer_backend: openai_chat
|
||||
target_backend: openai_chat
|
||||
optimizer: gpt-5.5 # Optimizer deployment/model
|
||||
target: gpt-5.5 # Target deployment/model
|
||||
azure_openai_auth_mode: api_key
|
||||
```
|
||||
|
||||
| Backend | Optimizer | Target | Configuration |
|
||||
|---|:---:|:---:|---|
|
||||
| `openai_chat` | ✓ | ✓ | Azure OpenAI, or its explicit compatibility auth mode |
|
||||
| `openai_compatible` | ✓ | ✓ | Generic OpenAI Chat Completions endpoint |
|
||||
| `claude_chat` | ✓ | ✓ | Claude Code CLI (`claude -p`) |
|
||||
| `qwen_chat` | ✓ | ✓ | Qwen served through an OpenAI-compatible local endpoint |
|
||||
| `minimax_chat` | ✓ | ✓ | MiniMax API |
|
||||
| `codex_exec` | — | ✓ | Codex CLI execution harness |
|
||||
| `claude_code_exec` | — | ✓ | Claude Code CLI execution harness |
|
||||
|
||||
The current MiniMax adapter has one shared deployment. Set
|
||||
`model.minimax_model` when MiniMax is the target; a mixed-backend run cannot
|
||||
independently select a MiniMax optimizer model and a different target model.
|
||||
|
||||
For a generic compatible provider, select the role backends explicitly rather
|
||||
than relying on a high-level shorthand:
|
||||
|
||||
```yaml
|
||||
model:
|
||||
optimizer_backend: openai_compatible
|
||||
target_backend: openai_compatible
|
||||
optimizer: deepseek-chat
|
||||
target: deepseek-chat
|
||||
```
|
||||
|
||||
The train/eval entry points apply `model.optimizer` and `model.target` after
|
||||
backend initialization. For the selected roles, these YAML values override
|
||||
`OPENAI_COMPATIBLE_MODEL`, `QWEN_CHAT_MODEL`, and their per-role environment
|
||||
forms. The environment model variables mainly seed direct library use; always
|
||||
set the role models in a training or evaluation config.
|
||||
|
||||
### Training
|
||||
|
||||
```yaml
|
||||
@@ -96,9 +134,16 @@ Notes:
|
||||
```yaml
|
||||
evaluation:
|
||||
use_gate: true # Validation gating (accept/reject updates)
|
||||
gate_metric: hard # hard | soft | mixed
|
||||
gate_mixed_weight: 0.5 # Soft-score weight when metric=mixed
|
||||
use_semantic_density: false # Optional instruction-density bonus
|
||||
eval_test: true # Run test evaluation after training
|
||||
```
|
||||
|
||||
The default and paper-style setting is `use_gate: true`. Setting it to `false`
|
||||
still records selection scores but force-accepts every candidate, so it changes
|
||||
the optimization semantics and should be reported explicitly.
|
||||
|
||||
### Environment (Data)
|
||||
|
||||
```yaml
|
||||
@@ -117,9 +162,10 @@ Override any config value from the command line:
|
||||
```bash
|
||||
python scripts/train.py \
|
||||
--config configs/searchqa/default.yaml \
|
||||
optimizer.learning_rate=16 \
|
||||
optimizer.lr_scheduler=linear \
|
||||
gradient.analyst_workers=8
|
||||
--cfg-options \
|
||||
optimizer.learning_rate=16 \
|
||||
optimizer.lr_scheduler=linear \
|
||||
gradient.analyst_workers=8
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
@@ -128,11 +174,38 @@ Model credentials are loaded from environment variables:
|
||||
|
||||
| Variable | Backend | Description |
|
||||
|---|---|---|
|
||||
| `AZURE_OPENAI_ENDPOINT` | azure_openai | Azure resource endpoint |
|
||||
| `AZURE_OPENAI_API_KEY` | azure_openai | Azure API key |
|
||||
| `OPENAI_API_KEY` | openai | OpenAI API key |
|
||||
| `ANTHROPIC_API_KEY` | claude | Anthropic API key |
|
||||
| `QWEN_API_BASE` | qwen | Local Qwen vLLM endpoint |
|
||||
| `AZURE_OPENAI_ENDPOINT` | `openai_chat` | Azure resource URL, or compatibility-mode base URL |
|
||||
| `AZURE_OPENAI_API_VERSION` | `openai_chat` | Azure API version |
|
||||
| `AZURE_OPENAI_AUTH_MODE` | `openai_chat` | `api_key`, `azure_cli`, `managed_identity`, or `openai_compatible` |
|
||||
| `AZURE_OPENAI_API_KEY` | `openai_chat` | Required when auth mode is `api_key` or `openai_compatible` |
|
||||
| `OPENAI_COMPATIBLE_BASE_URL` | `openai_compatible` | Generic Chat Completions base URL |
|
||||
| `OPENAI_COMPATIBLE_API_KEY` | `openai_compatible` | Provider API key; optional for local servers |
|
||||
| `OPENAI_COMPATIBLE_MODEL` | `openai_compatible` | Shared provider model ID for direct library use; train/eval YAML role models take precedence |
|
||||
| `CLAUDE_CLI_BIN` | `claude_chat` | Optional path to the `claude` executable; defaults to `claude` |
|
||||
| `ANTHROPIC_API_KEY` | `claude_chat` | Optional authentication method understood by the Claude CLI, not a direct SkillOpt API client |
|
||||
| `QWEN_CHAT_BASE_URL` | `qwen_chat` | Local Qwen/vLLM endpoint |
|
||||
| `QWEN_CHAT_MODEL` | `qwen_chat` | Served model name for direct library use; train/eval YAML role models take precedence |
|
||||
| `MINIMAX_BASE_URL` | `minimax_chat` | MiniMax-compatible base URL |
|
||||
| `MINIMAX_API_KEY` | `minimax_chat` | MiniMax API key |
|
||||
|
||||
`OPTIMIZER_` and `TARGET_` prefixes provide per-role overrides for the
|
||||
Azure, OpenAI-compatible, and Qwen variable families. See the
|
||||
[Configuration Reference](../reference/config.md) for exact names.
|
||||
|
||||
`claude_chat` launches the installed Claude Code CLI with `claude -p`; install
|
||||
and authenticate that CLI before use. Setting `ANTHROPIC_API_KEY` is one way
|
||||
the CLI may authenticate, but SkillOpt does not call the Anthropic API
|
||||
directly through this backend.
|
||||
|
||||
### Three OpenAI-compatible paths
|
||||
|
||||
- Research, generic provider: select `openai_compatible` and use
|
||||
`OPENAI_COMPATIBLE_*`.
|
||||
- Research, Azure-family compatibility mode: keep `openai_chat`, set
|
||||
`AZURE_OPENAI_AUTH_MODE=openai_compatible`, and use `AZURE_OPENAI_*`.
|
||||
- SkillOpt-Sleep: run with `--backend azure_openai` and use the same
|
||||
compatibility-mode `AZURE_OPENAI_*` variables. Sleep does not read the
|
||||
research backend's role-specific variables.
|
||||
|
||||
## Full Reference
|
||||
|
||||
|
||||
Reference in New Issue
Block a user