Downloads · 30 days
0
True2456/Qwen3.6-35B-A3B-Code-as-Action-LoRA
Qwen3.6-35B-A3B-Code-as-Action-LoRA is a text generation model from True2456. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
LoRA adapter that specializes Qwen3.6 / Qwen3.5-35B-A3B (MoE, ~3B active parameters) for code-as-action agent behavior: solve problems by writing and executing programs, then conditioning the next step on execution fe…
Downloads · 30 days
0
Access
Public
Updated Jul 15, 2026
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1 GB · 100%
From the Hugging Face model README
LoRA adapter that specializes Qwen3.6 / Qwen3.5-35B-A3B (MoE, ~3B active parameters) for code-as-action agent behavior: solve problems by writing and executing programs, then conditioning the next step on execution feedback.
This repository contains adapter weights only (not the full base model). Inference requires the corresponding MLX base checkpoint (e.g. lmstudio-community/Qwen3.6-35B-A3B-MLX-8bit or an equivalent Qwen3.5-35B-A3B MLX build).
The fine-tuning objective follows the CodeAct formulation (Wang et al., ICML 2024): treat executable code as a unified action space for LLM agents, instead of restricting tools to a fixed JSON/API schema. Related prior work includes ReAct (Yao et al., 2022) for interleaved reasoning and acting, and PAL (Gao et al., 2023) for program-aided reasoning.
Concretely, each training example teaches the model to:
<think>…</think>).<tool_call>
{"name": "bash", "arguments": {"cmd": "…"}}
</tool_call>
The scientific claim supported by CodeAct is that consolidating actions into executable Python/code improves agent success rate versus text/JSON action formats on tool-use benchmarks (up to ~20% absolute in the original evaluation suite). This adapter applies that design pattern via supervised LoRA fine-tuning on curated multi-turn trajectories; it is not a reproduction of CodeActInstruct training, and no official CodeActInstruct weights are claimed.
| Split | File | Rows |
|---|---|---|
| Train | train_qwen3.jsonl | 3,492 |
| Validation | valid_qwen3.jsonl | 389 |
Splits were produced by a deterministic 90/10 stratified partition (random.seed(42)) of frontier_procedural_combined_3881.jsonl (3,881 trajectories total). That combined pool is the union of:
| Source | Rows | Role |
|---|---|---|
frontier_2026_verified_clean.jsonl | 1,881 | Multi-step SWE / systems / analysis trajectories (verified, deduplicated) |
procedural_world_code_as_action_2000.jsonl | 2,000 | Executable checks for procedural/worldgen constraints (geometry, stitching, spacing invariants) |
Topic buckets used for stratification on the combined pool (pre-split counts):
| Bucket | Count | Content |
|---|---|---|
general | 1,201 | Hash/search proofs, CIDR math, log aggregation, algorithm checks, and related executable tasks |
ast | 1,180 | Python AST / static taint-style audits of synthetic example programs (defensive code review) |
assembly | 400 | Assembly reading / analysis exercises with executable verification |
concurrency | 380 | asyncio race / deadlock diagnosis and locked fixes |
distributed | 380 | Consensus / state-machine invariant checks |
bytecode | 340 | Bytecode / opcode interpretation with executable probes |
All samples are synthetic, programmatically generated instruction/response trajectories (prompt/completion pairs). They are not scraped chat logs, not proprietary customer data, and not the public CodeActInstruct corpus. Educational crypto examples use known toy ciphers with known keys/algorithms for decryption exercises; they are not materials for attacking live systems.
Action format in all Qwen train/valid rows: ChatML (<|im_start|> / <|im_end|>) + Qwen <tool_call> JSON for bash.
| Hyperparameter | Value |
|---|---|
| Base model | Qwen3.6-35B-A3B MLX 8-bit (Qwen3_5MoeForConditionalGeneration) |
| Method | LoRA (mlx_lm lora) |
| Rank | 8 |
| Scale | 20.0 |
| Dropout | 0.0 |
| LoRA layers | last 16 transformer layers |
| Optimizer | Adam |
| Learning rate | 3e-6 |
| Batch size | 4 |
| Max sequence length | 4,096 |
| Gradient checkpointing | enabled |
| Iterations | 423 (checkpoints every 100; final adapters.safetensors) |
| Hardware | Apple Silicon (MLX) |
This adapter is the code-as-action checkpoint only. A separately trained continuation that adds a large cybersecurity theory corpus exists under a different path (qwen3.6_35b_code_plus_theory_lora) and is not included here.
| File | Description |
|---|---|
adapters.safetensors | Final LoRA weights |
0000400_adapters.safetensors | Checkpoint at iteration 400 |
adapter_config.json | MLX LoRA training config snapshot |
python -m mlx_lm generate \
--model <path-or-id-to-Qwen3.6-35B-A3B-MLX> \
--adapter-path True2456/Qwen3.6-35B-A3B-Code-as-Action-LoRA \
--prompt '<|im_start|>user
Write a short Python script that prints the SHA-256 of "hello", then show the command you would run.
<|im_end|>
<|im_start|>assistant
'
Or with mlx_lm.utils.load:
from mlx_lm import load, generate
model, tokenizer = load(
"<path-or-id-to-Qwen3.6-35B-A3B-MLX>",
adapter_path="True2456/Qwen3.6-35B-A3B-Code-as-Action-LoRA",
)
@misc{true2456_qwen36_code_as_action_lora,
author = {True2456},
title = {Qwen3.6-35B-A3B Code-as-Action LoRA (MLX)},
year = {2026},
howpublished = {Hugging Face model repository},
note = {LoRA fine-tune for executable code actions; paradigm based on Wang et al. 2024 CodeAct}
}
Adapter weights are released under Apache 2.0. Use of the underlying Qwen base model remains subject to the base model’s license and terms from Alibaba / Qwen.