Skip to content
Merged
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
4 changes: 4 additions & 0 deletions align_system/configs/driver/chat_model/ollama_llama31.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_target_: langchain_ollama.ChatOllama
model: llama3.1:latest
temperature: 0.0
num_ctx: 16384
4 changes: 4 additions & 0 deletions align_system/configs/driver/chat_model/ollama_qwen25_32b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_target_: langchain_ollama.ChatOllama
model: qwen2.5:32b
temperature: 0.0
num_ctx: 16384
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# qwen2.5:32b served by the ollama instance on the itm server (4x RTX
# A6000); reachable directly on the local network
_target_: langchain_ollama.ChatOllama
model: qwen2.5:32b
base_url: http://itm:11434
temperature: 0.0
num_ctx: 16384
4 changes: 4 additions & 0 deletions align_system/configs/driver/chat_model/ollama_qwen25_7b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_target_: langchain_ollama.ChatOllama
model: qwen2.5:7b
temperature: 0.0
num_ctx: 16384
13 changes: 13 additions & 0 deletions align_system/configs/driver/chat_model/ollama_qwen3_32b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
_target_: langchain_ollama.ChatOllama
model: qwen3:32b
temperature: 0.0
# qwen3's native context window; the OW scene observations are large,
# and overflowing num_ctx makes ollama silently truncate the oldest
# context (including the system prompt's instructions)
num_ctx: 40960
# qwen3 is a thinking model. With reasoning false (think
# suppression) qwen3:32b was observed returning completely empty
# responses (no content, no tool calls); with true, the think phase
# runs but langchain-ollama routes it to a separate channel, keeping
# message content clean
reasoning: true
9 changes: 9 additions & 0 deletions align_system/configs/driver/chat_model/vllm_qwen25_15b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# HuggingFace model served by vLLM's OpenAI-compatible endpoint (start
# the server yourself; see vllm_qwen25_7b for details):
# vllm serve Qwen/Qwen2.5-1.5B-Instruct --enable-auto-tool-choice \
# --tool-call-parser hermes --max-model-len 8192 --port 8000
_target_: langchain_openai.ChatOpenAI
model: Qwen/Qwen2.5-1.5B-Instruct
base_url: http://localhost:8000/v1
api_key: EMPTY
temperature: 0.0
13 changes: 13 additions & 0 deletions align_system/configs/driver/chat_model/vllm_qwen25_3b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# HuggingFace model served by vLLM's OpenAI-compatible endpoint (start
# the server yourself; see vllm_qwen25_7b for details). Qwen2.5-3B is
# the smallest of the Qwen2.5 instruct models observed reliably
# driving the agent loop with structured tool calls (1.5B tends to
# emit dangling <tool_call> tags instead); at max-model-len 4096 it
# fits an 8GB GPU:
# vllm serve Qwen/Qwen2.5-3B-Instruct --enable-auto-tool-choice \
# --tool-call-parser hermes --max-model-len 4096 --port 8000
_target_: langchain_openai.ChatOpenAI
model: Qwen/Qwen2.5-3B-Instruct
base_url: http://localhost:8000/v1
api_key: EMPTY
temperature: 0.0
13 changes: 13 additions & 0 deletions align_system/configs/driver/chat_model/vllm_qwen25_7b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# HuggingFace model served by vLLM's OpenAI-compatible endpoint.
# Serving is left to the user (the align system doesn't manage the
# server process); start it before running, with tool calling enabled:
# vllm serve Qwen/Qwen2.5-7B-Instruct --enable-auto-tool-choice \
# --tool-call-parser hermes --port 8000
# See the docstring of align_system.drivers.itm_open_world_langchain
# for why the agent goes through the server rather than
# align_system.algorithms.vllm_inference_engine.
_target_: langchain_openai.ChatOpenAI
model: Qwen/Qwen2.5-7B-Instruct
base_url: http://localhost:8000/v1
api_key: EMPTY
temperature: 0.0
36 changes: 36 additions & 0 deletions align_system/configs/driver/itm_phase2_ow_langchain.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
defaults:
# Chat model for the agent -- must support tool calling. Select a
# different backend with e.g.
# - override /driver/chat_model: vllm_qwen25_7b
# in an experiment config (see configs/driver/chat_model/ for the
# available options; add new yamls there for other providers such as
# langchain_openai.ChatOpenAI or langchain_anthropic.ChatAnthropic).
# Alternatively set `model` to an init_chat_model string (e.g.
# "openai:gpt-4o"), which takes precedence over `chat_model`.
#
# NOTE: a local transformers pipeline
# (langchain_huggingface.HuggingFacePipeline) does NOT support tool
# calling and will not work with this driver; to run HuggingFace
# models locally, use the vllm_* chat_model configs instead, which
# talk to a separately started `vllm serve` OpenAI-compatible
# endpoint (see the docstring of
# align_system.drivers.itm_open_world_langchain for why)
- chat_model: ollama_llama31
- _self_

_target_: align_system.drivers.itm_open_world_langchain.ITMOpenWorldLangChainDriver

model: null

apply_action_filtering: true
sort_available_actions: false

# Hard cap on environment actions per scenario (safety net against
# agent loops); when hit, the driver ends the scene itself
max_actions_per_scenario: 100
# If the agent makes this many LLM calls without taking an action, the
# driver takes the first available action on its behalf so a live
# session can't stall
max_llm_calls_between_actions: 8
# Rolling window of conversation messages kept in the agent's context
max_messages_in_context: 40
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# @package _global_
defaults:
# The LangChain agent drives the scenario itself; no ADM is used
- override /adm: null
- override /interface: ta3
- override /driver: itm_phase2_ow_langchain
# llama3.1-8b tends to narrate instead of emitting tool calls on the
# larger open-world scenes; qwen2.5:32b is a much more reliable
# tool-caller. If you change the model, update interface.username
# to match (keep the testrun- prefix for test runs).
- override /driver/chat_model: ollama_qwen25_32b

interface:
# api_endpoint: "https://darpaitm.caci.com"
api_endpoint: 'http://127.0.0.1:8081'
session_type: eval
training_session: null
username: "testrun-ALIGN-ADM-Ph2-LangChainAgent-Qwen2.5-32B-Instruct"
domain: "owtriage"
adm_profile: FEB_OPENWORLD3

force_determinism: true
align_to_target: true
save_last_unstructured_state_per_scenario: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# @package _global_
# Live eval with the LangChain agent driver running a HuggingFace
# model served by vLLM's OpenAI-compatible endpoint. Start the server
# first, e.g.:
# vllm serve Qwen/Qwen2.5-7B-Instruct --enable-auto-tool-choice \
# --tool-call-parser hermes --port 8000
# If you serve a different model, override driver.chat_model.model and
# update interface.username to match (keep the testrun- prefix for
# test runs).
defaults:
# The LangChain agent drives the scenario itself; no ADM is used
- override /adm: null
- override /interface: ta3
- override /driver: itm_phase2_ow_langchain
- override /driver/chat_model: vllm_qwen25_7b

interface:
api_endpoint: "https://darpaitm.caci.com"
session_type: eval
training_session: null
username: "testrun-ALIGN-ADM-Ph2-LangChainAgent-HF-Qwen2.5-7B-Instruct"
domain: "owtriage"
adm_profile: FEB_OPENWORLD3

force_determinism: true
align_to_target: true
save_last_unstructured_state_per_scenario: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# @package _global_
# Local smoke test for the LangChain agent driver: replays recorded
# scenario states from a file instead of hitting a live TA3 server, so
# the agent's observe -> decide -> act loop can be exercised offline
defaults:
# The LangChain agent drives the scenario itself; no ADM is used
- override /adm: null
- override /interface: input_output_file
- override /driver: itm_phase2_ow_langchain

interface:
input_output_filepath: 'example_data/input_output_files/openworld_smoke_input_output.json'
state_hydration_domain: p2triage

align_to_target: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# @package _global_
# Offline smoke test of the LangChain agent driver with a HuggingFace
# model served by vLLM's OpenAI-compatible endpoint. Start the server
# first (see the vllm_* chat_model configs for the exact command)
defaults:
# The LangChain agent drives the scenario itself; no ADM is used
- override /adm: null
- override /interface: input_output_file
- override /driver: itm_phase2_ow_langchain
- override /driver/chat_model: vllm_qwen25_3b

interface:
input_output_filepath: 'example_data/input_output_files/openworld_smoke_input_output.json'
state_hydration_domain: p2triage

align_to_target: false
Loading