CoolFace
Modelpublic

peterjohannmedina/Medina-Qwen3.5-27B-OpenClaw

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
14likes193downloads
Model Card

Medina-Qwen3.5-27B-OpenClaw

A LoRA fine-tune of Jackrong/Qwen3.5-27B-Claude-4.6-Opus-Reasoning-Distilled trained on OpenClaw tool-call data — optimized for agentic reasoning with structured tool invocation.

The base model is a Claude 4.6 Opus reasoning distillation of Qwen3.5-27B. This fine-tune adds structured tool-calling capability in the OpenClaw XML format, making it suitable for local agentic deployments.


GGUF Downloads

QuantizationSizeUse case
Q4_K_M15.4 GB✅ Recommended — 24GB VRAM or 32GB unified memory
Q8_026.6 GBNear-lossless, 32GB+ VRAM or 48GB unified memory

Training Details

ParameterValue
Base modelJackrong/Qwen3.5-27B-Claude-4.6-Opus-Reasoning-Distilled
Training GPUNVIDIA A100 SXM4 80GB
FrameworkUnsloth + TRL SFTTrainer
DatasetOpenClaw tool-call examples (243 examples)
Training time~102 minutes
Epochs3
Steps48
Final loss0.7066
LoRA rankr=32, alpha=64, rsLoRA=True
LoRA dropout0.05
LoRA targetsq/k/v/o/gate/up/down proj
Trainable params159,383,552 (0.58%)
Context window4096 tokens
Batch size1 (effective: 8 with grad accum)
Learning rate2e-4 (cosine schedule, 5% warmup)
Quantization4-bit NF4 during training
OptimizerAdamW 8-bit

What It Does

This adapter teaches the model the OpenClaw tool-calling format — a structured XML-style invocation pattern used by the OpenClaw AI agent platform:

xml
<function_calls>
<invoke name="TOOL_NAME">
<parameter name="PARAM_NAME">value</parameter>
</invoke>
</function_calls>

Supported tools in training data: exec, read, write, edit, web_search, web_fetch, browser, memory_search, memory_get, message, cron, nodes, image, pdf, sessions_spawn, session_status


Usage with llama.cpp / Ollama

bash
# Ollama (Q4_K_M)
ollama run hf.co/peterjohannmedina/Medina-Qwen3.5-27B-OpenClaw:Q4_K_M

# llama.cpp direct
./llama-cli -m Medina-Qwen3.5-27B-OpenClaw-Q4_K_M.gguf \
  --ctx-size 4096 -p "You are an AI assistant with access to tools..."

Usage with Transformers (LoRA adapter)

python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

base = AutoModelForCausalLM.from_pretrained(
    "Jackrong/Qwen3.5-27B-Claude-4.6-Opus-Reasoning-Distilled",
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
model = PeftModel.from_pretrained(base, "peterjohannmedina/Medina-Qwen3.5-27B-OpenClaw")
tokenizer = AutoTokenizer.from_pretrained("peterjohannmedina/Medina-Qwen3.5-27B-OpenClaw")

Companion Model

For a smaller version that runs on M3 MacBook / 16GB systems:


License

Apache 2.0 — same as the base model.