Downloads · 30 days
0
ssaraf1/slm-workflow-planner-7b-v1
slm-workflow-planner-7b-v1 is a text generation model from ssaraf1. 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 for Qwen/Qwen2.5-7B-Instruct fine-tuned as a workflow execution planner. The model makes real-time decisions about workflow transitions by analyzing state signals, eligible nodes, and topology information.
Downloads · 30 days
0
Access
Public
Updated Feb 16, 2026
Repo size
162 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 100%
From the Hugging Face model README
LoRA adapter for Qwen/Qwen2.5-7B-Instruct fine-tuned as a workflow execution planner. The model makes real-time decisions about workflow transitions by analyzing state signals, eligible nodes, and topology information.
| Decision | Description |
|---|---|
| NEXT | Proceed to the next sequential step |
| RETRY | Retry the current step (within budget) |
| FORK | Launch parallel execution branches |
| JOIN | Synchronize parallel branches |
| META | Escalate — anomaly detected, human intervention needed |
| Parameter | Value |
|---|---|
| Rank | 16 |
| Alpha (scale) | 32 (2.0x) |
| Dropout | 0.02 |
| Target layers | Last 28 of 32 |
| Target modules | q_proj, k_proj, v_proj, o_proj |
| Parameter | Value |
|---|---|
| Framework | MLX (Apple Silicon native) |
| Hardware | Apple M4 Pro, 48GB unified memory |
| Iterations | 2,600 (converged) |
| Batch size | 4 (effective 8 with grad accumulation) |
| Learning rate | 8e-5 → 1e-6 (cosine decay) |
| Warmup | 400 steps |
| Sequence length | 512 |
| Precision | bfloat16 |
| Prompt masking | Yes (loss only on assistant tokens) |
| Iteration | Val Loss | Train Loss |
|---|---|---|
| 1 | 14.058 | — |
| 100 | 0.222 | 0.753 |
| 200 | 0.037 | 0.031 |
| 500 | 0.016 | 0.012 |
| 1000 | 0.011 | 0.009 |
| 2000 | 0.010 | 0.006 |
| 2600 | 0.009 | 0.005 |
Evaluated on 20 representative scenarios across Workshop and Insurance Claim domains:
| Category | Accuracy | Notes |
|---|---|---|
| NEXT | 5/5 (100%) | Including policy-boundary cases |
| RETRY | 0/4 (0%) | NEXT-collapse — class imbalance |
| FORK | 0/4 (0%) | NEXT-collapse — topology-only labels |
| JOIN | 0/3 (0%) | NEXT-collapse — topology-only labels |
| META | 0/4 (0%) | NEXT-collapse — insufficient coverage |
This model learned protocol (single-token planner output) and NEXT progression perfectly, but suffers from NEXT-dominance due to imbalanced pre-correction training data. The v2 model addresses this with policy-corrected labels and counterfactual negatives.
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load(
"Qwen/Qwen2.5-7B-Instruct",
adapter_path="ssaraf1/slm-workflow-planner-7b-v1"
)
messages = [
{"role": "system", "content": "You are a workflow planner. Given the current workflow state, eligible nodes, and topology information, classify the decision type."},
{"role": "user", "content": "Current node: TRIAGE_AND_ASSIGN (AGENT)\nOutcome: assigned\n\nState:\n goal_progress=0.15\n parallel_active=0\n resource_pressure=0.1\n\nEligible nodes:\n 1. VERIFY_POLICY (SYSTEM) → produces: policy_status\n 2. FRAUD_SCREENING (SYSTEM) → produces: fraud_score\n 3. DAMAGE_ASSESSMENT (AGENT) → produces: damage_report\n\nForkable sets: [{VERIFY_POLICY, FRAUD_SCREENING, DAMAGE_ASSESSMENT}]\nJoin-ready: []\n\nWhat decision type?"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
sampler = make_sampler(temp=0.0)
response = generate(model, tokenizer, prompt=prompt, max_tokens=10, sampler=sampler)
print(response) # Expected: FORK
This is a two-stage planner:
The adapter handles both stages via the same LoRA weights.
adapters.safetensors — LoRA adapter weights (checkpoint iter 2600)adapter_config.json — LoRA configuration for MLXPart of the Agentic Factory project — building autonomous workflow orchestration with SLM-powered planning on Apple Silicon.