# Qwen3.5-4B DFlash draft, online disaggregated — AMD ROCm single node.
# The producer/consumer stream target features live through Mooncake. Launch the
# patched capture server with AITER + --disable-radix-cache (Qwen3.5-4B is a hybrid
# Mamba target); the trainer runs on ROCm unchanged (flex_attention).
# See docs/basic_usage/AMD/amd_rocm.md, Section 4.
model:
  target_model_path: "Qwen/Qwen3.5-4B"
  draft_model_config: "configs/qwen3.5-4b-dflash.json"
  target_backend: "sglang"
  trust_remote_code: true
  embedding_key: "model.language_model.embed_tokens.weight"
  torch_dtype: "bfloat16"
data:
  train_data_path: "./cache/dataset/sharegpt_train.jsonl"
  max_length: 2048
  chat_template: "qwen3.5"
  build_dataset_num_proc: 32
  cache_dir: "./cache"
training:
  strategy: "dflash"
  num_epochs: 10
  max_steps: 10000
  batch_size: 2
  accumulation_steps: 4
  learning_rate: 6.0e-4
  warmup_ratio: 0.04
  max_grad_norm: 1
  attention_backend: "flex_attention"
  num_anchors: 512
  loss_decay_gamma: 7
  save_interval: 1000
  log_interval: 50
  dist_timeout: 30
  seed: 42
tracking:
  report_to: "tensorboard"
run_id: "qwen3.5-4b-dflash-online"
output_dir: "./outputs/qwen3.5-4b-dflash-online"

deployment:
  mode: disaggregated
  trainer:
    nnodes: 1
    nproc_per_node: 1
  disaggregated:
    control_dir: outputs/qwen3.5-4b-dflash-online/control
    consumer_state_dir: outputs/qwen3.5-4b-dflash-online/consumer-state
    backend: mooncake
    server_urls:
      - http://127.0.0.1:30000
    mooncake_metadata_server: http://127.0.0.1:35880/metadata
    mooncake_master_server_addr: 127.0.0.1:35551
    mooncake_protocol: tcp
