Downloads · 30 days
187
59% of all-time downloads
RedTeamLab/Gemma-4-E4B-Sol-Traces-v2
Gemma-4-E4B-Sol-Traces-v2 is a machine learning model from RedTeamLab. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for gguf. The card lists the license as gemma.
Continuation-trained coding-agent model from unsloth/gemma-4-E4B-it. Builds on the Sol-Traces v1 base with additional Hermes Agent session traces, expanding tool coverage from 5 to 99 tools and introducing real agent…
Downloads · 30 days
187
59% of all-time downloads
All-time downloads
318
Public
Repo size
20.5 GB
Likes
0
Public
Click a slice to open those files.
.gguf20.4 GB · 100%
From the Hugging Face model README
Continuation-trained coding-agent model from unsloth/gemma-4-E4B-it. Builds on the Sol-Traces v1 base with additional Hermes Agent session traces, expanding tool coverage from 5 to 99 tools and introducing real agent behavior patterns alongside the original deterministic trajectories.
Sol Traces denotes tool-use traces compiled from Hermes Agent session logs; the traces do not originate from OpenCode.
| Parameter | Value |
|---|---|
| Base model | unsloth/gemma-4-E4B-it (MoE, 4 active experts) |
| Base revision | 4e22d7e59e078e63a14f351efdc5232ed366b621 |
| Fine-tuning | LoRA continuation from v1 adapter (r=16, alpha=16, dropout=0) |
| Target modules | Language + attention only (k/q/v/o/gate/up/down projection) — 264 LoRA keys |
| Dataset | 21,438 train / 1,339 val / 2,534 test (merged v1-upgraded + v2-hermes-native) |
| Dataset provenance | v1-upgraded-with-tool-responses + hermes-log-canonical |
| Steps | 500 |
| Learning rate | 1e-4, cosine scheduler with 3% warmup |
| Batch size | 8 (1 × 8 gradient accumulation) |
| Max sequence | 8,192 tokens |
| Loss type | Assistant-only (tool responses excluded from loss) |
| GPU | Modal H100 80GB |
| Training time | ~2h 34min |
| Final train loss | 0.0255 |
| Validation loss | 0.0528 |
| Peak VRAM | 27.0 GiB / 80 GiB |
| Metric | Value |
|---|---|
| Training records | 264 (hermes-native canonical slice) |
| Steps | 22 |
| Training loss | 0.0102 |
| Eval loss | 2.133 |
| Runtime | 44.6s |
| Adapter integrity | 264 keys matched and loaded from v1 source ✅ |
The training dataset merges two sources:
The original Sol-Traces v1 corpus of 25,000 verified deterministic trajectories with full tool responses preserved and reformatted for the expanded Hermes-native tool schema. These are the same 224 repository-family trajectories from v1, re-rendered with complete tool-response pairs rather than the original tool-response-masked format.
Redacted, verified Hermes Agent session traces drawn from ~/.hermes/state.db. These trajectories use the full Hermes-native tool schema (99 tools) and reflect real agent behavior patterns including:
The full merged training uses a 99-tool schema drawn from the Hermes Agent runtime environment:
<details> <summary>Full tool list (99 tools)</summary>apply_learnings, apply_patch, autonomous_decide, backgroundbrowser_click, browser_console, browser_fill_form, browser_get_imagesbrowser_press, browser_scroll, browser_snapshot, browser_type, browser_visionclarify, cost_check, cronjob, delegate_taskevey_goals, execute_codefabric_brief, fabric_recall, fabric_search, fabric_writefreeride freehoncho_profile, honcho_searchimage_generatekill, learn_from_interactionlist_filesmcp__openrouter__generate_image, mcp__proxmox__*, mcp_chrome_devtools_*mcp_cloudflare_*, mcp_docker_*, mcp_insforge_*, mcp_leonardo_*mcp_porkbun_*, mcp_preference_*mem0_conclude, mem0_profile, mem0_search, memory, memory_decay, memory_scorepatch, processread_file, run_commandsearch_files, send_message, session_searchskill_manage, skill_view, skills_listtask, terminal, todotool_call, tool_describe, tool_searchvision_analyze, watchdog_statusweb_search, write_file| Guarantee | Status |
|---|---|
| Source logs | ~/.hermes/state.db only |
| Secrets, credentials | Fully redacted: [REDACTED] |
| Private paths | Fully redacted |
| Session IDs | Opaque HMAC-derived identifiers only |
| Content consent | Authorized Hermes traces, last 60 days |
| Privacy post-scan | Zero findings |
| File | Size | Description |
|---|---|---|
gemma-4-e4b-sol-traces-v2-Q4_K_M.gguf | ~5 GiB | Quantized merged model — recommended for deployment |
gemma-4-e4b-sol-traces-v2-f16.gguf | ~14 GiB | Full F16 merged model — for custom quantization |
adapter/adapter_model.safetensors | 35 MiB | LoRA adapter weights (for PEFT-based loading) |
adapter/adapter_config.json | — | LoRA configuration (r=16, alpha=16) |
training_stats.json | — | Full training metrics and run report |
Note: The Q4_K_M file is the recommended deployment format for llama.cpp. The F16 is provided for downstream quantization experiments. The
adapter/directory allows PEFT-based loading without merging.
# Q4_K_M — one file, ready to go
llama-cli \
-m gemma-4-e4b-sol-traces-v2-Q4_K_M.gguf \
-ngl 99 \
--prompt "Find all package.json files in the project"
# Server mode with tool support
llama-server \
-m gemma-4-e4b-sol-traces-v2-Q4_K_M.gguf \
-ngl 99 \
-c 4096 \
--host 127.0.0.1 --port 8096
from unsloth import FastModel
from peft import PeftModel
base = "unsloth/gemma-4-E4B-it"
model, tokenizer = FastModel.from_pretrained(
model_name=base, max_seq_length=8192,
dtype=torch.bfloat16, load_in_4bit=False,
token="hf_...",
)
model = PeftModel.from_pretrained(model, "./adapter/")
Sol-Traces v2 introduces two major improvements over v1:
v1 restricted the model to 5 deterministic tools (list_files, read_file, search_code, run_command, apply_patch). v2 exposes the full Hermes Agent tool registry including browser automation (browser_*), MCP integrations (mcp_*), memory management (mem0_*, memory), task delegation (delegate_task), scheduling (cronjob), and cloud API access.
v1 trajectories were generated by a deterministic reference executor that always followed the same pattern: list → read → run → patch → verify. v2 includes real Hermes Agent session traces with genuine decision-making:
v2 uses continuation training from the v1 adapter rather than training from scratch:
This preserves the reliable v1 behavior while adding the new v2 capabilities.
The model excels at:
| Metric | v1 | v2 | Δ |
|---|---|---|---|
| Training records | 21,174 | 21,438 | +264 |
| Tool schema | 5 (deterministic) | 99 (Hermes-native) | +94 |
| Training loss | 0.0096 | 0.0255 | +0.0159 |
| Eval loss | 0.0235 | 0.0528 | +0.0293 |
| Training time | 1h 03m | 2h 34m | +1h 31m |
| Data diversity | Narrow (2 tool sequences) | Broad (99 tools, real agent patterns) | Significant |
The higher loss numbers in v2 reflect the more diverse and challenging training distribution — the model is learning a much broader task space with less repetition, not regressing.
| Tool | v1 Selection | v1 Exact Pass |
|---|---|---|
list_files | 5/5 (100%) | 0/5 (0%) |
read_file | 4/5 (80%) | 3/5 (60%) |
search_code | 0/5 (0%) | 0/5 (0%) |
run_command | 2/5 (40%) | 1/5 (20%) |
apply_patch | 1/5 (20%) | 1/5 (20%) |
no-tool | 4/5 (80%) | 4/5 (80%) |
The v1 E2B model showed a 30% overall routing pass rate (9/30). v2 routing evaluation results will be published when available.
{
"status": "success",
"run_kind": "e4b-v1-sol-traces-v2-full-continuation",
"base_model": "unsloth/gemma-4-E4B-it",
"base_revision": "4e22d7e59e078e63a14f351efdc5232ed366b621",
"dataset_version": "sol-traces-v2.0.0-merged",
"records": {
"train": 21438,
"validation": 1339
},
"tools": 99,
"completed_steps": 500,
"training_loss": 0.02548,
"eval_loss": 0.05275,
"learning_rate": 0.0001,
"peak_memory_gib": 26.96,
"runtime_seconds": 9260
}
| Model | Active Params | Q4 Size | Training Loss | Tools | Best For |
|---|---|---|---|---|---|
| E2B v1 | ~5B | 3.2 GB | 0.0229 | 5 | Edge, CPU+GPU hybrid |
| 12B v1 | 12B | 6.8 GB | 0.0800 | 5 | Balanced performance |
| E4B v1 | ~8B | 4.9 GB | 0.0096 | 5 | Best quality-size trade-off |
| E4B v2 (this) | ~8B | ~5 GB | 0.0255 | 99 | Full Hermes-native agent |
| 26B-A4B v1 | ~8B* | 15.6 GB | 0.0113 | 5 | Maximum capability |
*E4B and 26B-A4B both activate 4 experts but have different base architectures (dedicated encoder vs unified).
list_files bias) may persist.Use at your own risk. This model is fine-tuned for coding-agent scenarios. The model owner accepts no liability for any damages or losses arising from its use. Users are responsible for compliance with applicable laws and regulations.