KikoCis commited on
Commit
37a6432
·
verified ·
1 Parent(s): 07303dc

Agents-A1 IQ2_M GGUF (imatrix) + agentic SWE eval + context Modelfiles

Browse files
Files changed (12) hide show
  1. .gitattributes +3 -0
  2. Agents-A1-IQ2_M.gguf +3 -0
  3. Agents-A1.imatrix +3 -0
  4. CONTEXT.md +26 -0
  5. Modelfile.128k +4 -0
  6. Modelfile.32k +4 -0
  7. Modelfile.8k +4 -0
  8. Modelfile.native +4 -0
  9. README.md +76 -0
  10. banner.png +3 -0
  11. banner.svg +16 -0
  12. swe_mix.json +157 -0
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Agents-A1-IQ2_M.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Agents-A1.imatrix filter=lfs diff=lfs merge=lfs -text
38
+ banner.png filter=lfs diff=lfs merge=lfs -text
Agents-A1-IQ2_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d4f33072cf991885b823b30b04aa0d4a7ac649a575803c392d7d403c8f7d156
3
+ size 11659235200
Agents-A1.imatrix ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:511924f1da9b8d05a7485b7bbe0bd3a152c4c6ba624c4472bdf408875bd37176
3
+ size 192223904
CONTEXT.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Context size guide — Agents-A1-IQ2_M
2
+
3
+ The model's native context is **262,144 tokens** (256K). You almost never need that much, and KV-cache memory grows with the context window, so pick the smallest window that fits your task.
4
+
5
+ ## Ready-made Modelfiles (Ollama)
6
+ | file | num_ctx | use for |
7
+ |---|---|---|
8
+ | `Modelfile.8k` | 8,192 | quick Q&A, short snippets — lightest KV |
9
+ | `Modelfile.32k` | 32,768 | most agentic/coding sessions (recommended default) |
10
+ | `Modelfile.128k` | 131,072 | long files / large repos |
11
+ | `Modelfile.native` | 262,144 | full native context (heaviest KV, needs lots of RAM) |
12
+
13
+ ```bash
14
+ # build a context-sized model in Ollama
15
+ ollama create agents-a1-32k -f Modelfile.32k
16
+ ollama run agents-a1-32k
17
+ ```
18
+
19
+ ## llama.cpp
20
+ ```bash
21
+ llama-server -m Agents-A1-IQ2_M.gguf -c 32768 --jinja --temp 1.0 --top-p 0.95
22
+ # bump -c up to 262144 for the full window
23
+ ```
24
+
25
+ ## Rough KV-cache cost
26
+ KV memory scales roughly linearly with `num_ctx`. On top of the ~11.7 GB of weights, budget a few hundred MB at 8K, ~1–2 GB at 32K, and several GB at 128K+. If you hit OOM, lower `num_ctx` first.
Modelfile.128k ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ FROM ./Agents-A1-IQ2_M.gguf
2
+ PARAMETER num_ctx 131072
3
+ PARAMETER temperature 1.0
4
+ PARAMETER top_p 0.95
Modelfile.32k ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ FROM ./Agents-A1-IQ2_M.gguf
2
+ PARAMETER num_ctx 32768
3
+ PARAMETER temperature 1.0
4
+ PARAMETER top_p 0.95
Modelfile.8k ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ FROM ./Agents-A1-IQ2_M.gguf
2
+ PARAMETER num_ctx 8192
3
+ PARAMETER temperature 1.0
4
+ PARAMETER top_p 0.95
Modelfile.native ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ FROM ./Agents-A1-IQ2_M.gguf
2
+ PARAMETER num_ctx 262144
3
+ PARAMETER temperature 1.0
4
+ PARAMETER top_p 0.95
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: InternScience/Agents-A1
4
+ tags:
5
+ - gguf
6
+ - ollama
7
+ - llama.cpp
8
+ - agentic-coding
9
+ - reasoning
10
+ - qwen3_5_moe
11
+ - moe
12
+ language:
13
+ - en
14
+ ---
15
+
16
+ ![banner](banner.png)
17
+
18
+ # Agents-A1 — IQ2_M GGUF
19
+
20
+ > **InternScience's Agents-A1** (a ~35B-A3B hybrid-attention MoE agent model) quantized to a single **IQ2_M GGUF (~11.7 GB)** that runs on a 16 GB machine. It **solves real SWE-bench Verified tasks** in an agentic Claude-Code-style loop. This is **InternScience's model** — ours is the quant + imatrix + eval + ready-to-run Modelfiles. (No other GGUF existed when this was published, so this is the first-mover GGUF; if unsloth/others ship one, ours adds an imatrix, a documented agentic eval, and configurable-context Modelfiles.)
21
+
22
+ ## 📦 Which quant should I pick?
23
+ This repo ships the **IQ2_M** — the sweet spot for a ~35B MoE: smallest that still runs real agentic loops sharply, made with an importance matrix (imatrix).
24
+
25
+ | file | bits | size | pick this if… |
26
+ |---|---|---|---|
27
+ | `Agents-A1-IQ2_M.gguf` | ~2.7 | **~11.7 GB** | **the one in this repo** — fits 16 GB RAM/VRAM, still does agentic coding |
28
+
29
+ <!-- Quant names: K-quants (Q*_K) = good general quants. I-quants (IQ*) = smaller at the same quality but need an imatrix (we ship `Agents-A1.imatrix`) and a bit more CPU. Higher number = more bits = better + bigger. -->
30
+
31
+ ## 🧮 Will it fit? (RAM/VRAM cheat-sheet)
32
+ Total memory ≈ weights (~11.7 GB) + KV-cache (grows with context).
33
+ | you have | comfortable context |
34
+ |---|---|
35
+ | 16 GB | ~8–32K |
36
+ | 24 GB | ~64–128K |
37
+ | 32 GB+ | up to native 256K |
38
+
39
+ If you OOM, lower `num_ctx` (see [`CONTEXT.md`](CONTEXT.md)).
40
+
41
+ ## 🧠 Context size (native 262,144 / 256K)
42
+ Configurable — Modelfiles at **8K / 32K / 128K / native** are included; full guide in [`CONTEXT.md`](CONTEXT.md). 32K is the recommended default for agentic/coding work.
43
+
44
+ ## 🚀 How to run it
45
+ ```bash
46
+ # Ollama (build a 32K-context model from the included Modelfile)
47
+ ollama create agents-a1-32k -f Modelfile.32k
48
+ ollama run agents-a1-32k
49
+
50
+ # llama.cpp (use a recent build — this is a qwen3_5_moe hybrid-attention MoE)
51
+ llama-server -m Agents-A1-IQ2_M.gguf -c 32768 --jinja --temp 1.0 --top-p 0.95
52
+ ```
53
+ **Recommended sampling**: temperature **1.0**, top_p **0.95**. This is a reasoning model — it emits a thinking channel before its answer; keep temperature high (≈1.0). Low temperature (≤0.2) tends to cause repetition loops.
54
+
55
+ **Agentic use**: native tool-calling works out of the box with the model's bundled chat template — pass your tools via the standard OpenAI/`tools` parameter (or Anthropic-style via a bridge) and it returns proper `tool_calls`. No text-injection workaround needed.
56
+
57
+ > ⚠️ **Needs a recent llama.cpp.** Agents-A1 is a `qwen3_5_moe` hybrid (gated-delta-net linear-attention layers + MoE, every-4th-layer full attention). It requires a llama.cpp build new enough to include the `qwen35moe` graph. Older builds will fail to load it.
58
+
59
+ ## ⚠️ Good to know
60
+ - **Strengths**: agentic coding / tool use — runs clean multi-turn Claude-Code-style loops, makes decisive single tool calls per turn, doesn't degenerate. Long native context (256K). Efficient: ~3B active params (MoE) so it's fast for its size.
61
+ - **Limits**: this is a **2-bit** quant of a small-active-params MoE — it will not match a full-precision 70B. On the hardest, multi-file SWE tasks it often explores well but doesn't always land the exact fix. Use ≥ Q4 if you have the RAM and need max fidelity (not shipped here; quantize from the source if needed).
62
+ - **Quirk**: emits an internal reasoning/thinking channel; if your client shows it, you can strip everything before the final answer.
63
+
64
+ ## 📊 Evaluation methodology (MANDATORY — never lose how it was measured)
65
+ - **Score**: **1/5** on a fail-fast **swe-mix pre-screen** subset (5 SWE-bench Verified django instances). Resolved: **django__django-11099** (1/1 tests). The gate to publish is **resolve ≥ 1** — this build passed. All 5 ran clean agentic loops (37–39 tool calls each, **0 empty/degenerate turns**, no crash or loop).
66
+ - **Exact instances** (pre-screen): `django__django-11133` (✗), `django__django-11099` (✓), `django__django-13590` (✗), `django__django-13933` (✗), `django__django-14608` (✗). The full 30-instance discriminating probe spec is in [`swe_mix.json`](swe_mix.json) — 6 continuity anchors + 24 discriminating (10 repos); the pre-screen runs the first 5.
67
+ - **Harness**: Claude Code + agent-bridge.js (Anthropic→OpenAI translation, context eviction) → llama.cpp `llama-server`, in terminal-bench / Docker, native `tools` calling, 80-message cap per task.
68
+ - **Sampling**: temperature **1.0**, top_p **0.95**. **Tool format**: native (`tools` param; not bypassed — the model's chat template emits proper `tool_calls`).
69
+ - **Quant**: **IQ2_M**, imatrix computed on a code+general corpus (273×512-tok chunks, final PPL ≈ 1.82 on the calib set), **11.66 GB**, requantized from a near-lossless Q8_0 intermediate.
70
+ - **Date**: 2026-06-29. *Caveat: small/hard local probe, relative ranking — NOT 1:1 with the official SWE-bench leaderboard.*
71
+
72
+ ## 🗒️ Changelog
73
+ - 2026-06-29 v1: initial IQ2_M release. SWE-mix pre-screen: **1/5** (resolved `django__django-11099`, 1/1 tests) — gate passed. Clean agentic loops on all 5 (native tool calls, 0 degenerate turns). Probe spec in `swe_mix.json`.
74
+
75
+ ## 📚 Credit & license
76
+ Model, weights, and training: **© InternScience** — [InternScience/Agents-A1](https://huggingface.co/InternScience/Agents-A1). Quant (IQ2_M) + importance matrix + agentic eval + context Modelfiles: KikoCis. **apache-2.0** (same as upstream). No weights were modified beyond quantization — this is a faithful re-quant, not a fine-tune.
banner.png ADDED

Git LFS Details

  • SHA256: b004b80c4bd064dba3a2be50f3a38274a6d36c186be55b09e647c64d5c5668e0
  • Pointer size: 131 Bytes
  • Size of remote file: 350 kB
banner.svg ADDED
swe_mix.json ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "description": "6 continuity-anchor instances (the original probe, comparable to all prior experiments) + 24 discriminating (15x '1-4h' + 9x '15min-1h'). 10+ repos.",
3
+ "anchor_6": [
4
+ {
5
+ "instance_id": "django__django-11133",
6
+ "repo": "django/django",
7
+ "difficulty": "<15 min fix"
8
+ },
9
+ {
10
+ "instance_id": "django__django-11099",
11
+ "repo": "django/django",
12
+ "difficulty": "<15 min fix"
13
+ },
14
+ {
15
+ "instance_id": "django__django-13590",
16
+ "repo": "django/django",
17
+ "difficulty": "15 min - 1 hour"
18
+ },
19
+ {
20
+ "instance_id": "django__django-13933",
21
+ "repo": "django/django",
22
+ "difficulty": "<15 min fix"
23
+ },
24
+ {
25
+ "instance_id": "django__django-14608",
26
+ "repo": "django/django",
27
+ "difficulty": "<15 min fix"
28
+ },
29
+ {
30
+ "instance_id": "django__django-14752",
31
+ "repo": "django/django",
32
+ "difficulty": "<15 min fix"
33
+ }
34
+ ],
35
+ "discriminating_24": [
36
+ {
37
+ "instance_id": "astropy__astropy-13398",
38
+ "repo": "astropy/astropy",
39
+ "difficulty": "1-4 hours"
40
+ },
41
+ {
42
+ "instance_id": "astropy__astropy-13579",
43
+ "repo": "astropy/astropy",
44
+ "difficulty": "1-4 hours"
45
+ },
46
+ {
47
+ "instance_id": "astropy__astropy-14369",
48
+ "repo": "astropy/astropy",
49
+ "difficulty": "1-4 hours"
50
+ },
51
+ {
52
+ "instance_id": "django__django-10554",
53
+ "repo": "django/django",
54
+ "difficulty": "1-4 hours"
55
+ },
56
+ {
57
+ "instance_id": "django__django-11138",
58
+ "repo": "django/django",
59
+ "difficulty": "1-4 hours"
60
+ },
61
+ {
62
+ "instance_id": "django__django-11400",
63
+ "repo": "django/django",
64
+ "difficulty": "1-4 hours"
65
+ },
66
+ {
67
+ "instance_id": "pydata__xarray-3993",
68
+ "repo": "pydata/xarray",
69
+ "difficulty": "1-4 hours"
70
+ },
71
+ {
72
+ "instance_id": "pylint-dev__pylint-4551",
73
+ "repo": "pylint-dev/pylint",
74
+ "difficulty": "1-4 hours"
75
+ },
76
+ {
77
+ "instance_id": "pylint-dev__pylint-8898",
78
+ "repo": "pylint-dev/pylint",
79
+ "difficulty": "1-4 hours"
80
+ },
81
+ {
82
+ "instance_id": "pytest-dev__pytest-10356",
83
+ "repo": "pytest-dev/pytest",
84
+ "difficulty": "1-4 hours"
85
+ },
86
+ {
87
+ "instance_id": "pytest-dev__pytest-5787",
88
+ "repo": "pytest-dev/pytest",
89
+ "difficulty": "1-4 hours"
90
+ },
91
+ {
92
+ "instance_id": "pytest-dev__pytest-6197",
93
+ "repo": "pytest-dev/pytest",
94
+ "difficulty": "1-4 hours"
95
+ },
96
+ {
97
+ "instance_id": "scikit-learn__scikit-learn-25102",
98
+ "repo": "scikit-learn/scikit-learn",
99
+ "difficulty": "1-4 hours"
100
+ },
101
+ {
102
+ "instance_id": "sphinx-doc__sphinx-11510",
103
+ "repo": "sphinx-doc/sphinx",
104
+ "difficulty": "1-4 hours"
105
+ },
106
+ {
107
+ "instance_id": "sphinx-doc__sphinx-8548",
108
+ "repo": "sphinx-doc/sphinx",
109
+ "difficulty": "1-4 hours"
110
+ },
111
+ {
112
+ "instance_id": "astropy__astropy-12907",
113
+ "repo": "astropy/astropy",
114
+ "difficulty": "15 min - 1 hour"
115
+ },
116
+ {
117
+ "instance_id": "astropy__astropy-13033",
118
+ "repo": "astropy/astropy",
119
+ "difficulty": "15 min - 1 hour"
120
+ },
121
+ {
122
+ "instance_id": "django__django-10973",
123
+ "repo": "django/django",
124
+ "difficulty": "15 min - 1 hour"
125
+ },
126
+ {
127
+ "instance_id": "django__django-11087",
128
+ "repo": "django/django",
129
+ "difficulty": "15 min - 1 hour"
130
+ },
131
+ {
132
+ "instance_id": "matplotlib__matplotlib-14623",
133
+ "repo": "matplotlib/matplotlib",
134
+ "difficulty": "15 min - 1 hour"
135
+ },
136
+ {
137
+ "instance_id": "matplotlib__matplotlib-20488",
138
+ "repo": "matplotlib/matplotlib",
139
+ "difficulty": "15 min - 1 hour"
140
+ },
141
+ {
142
+ "instance_id": "mwaskom__seaborn-3069",
143
+ "repo": "mwaskom/seaborn",
144
+ "difficulty": "15 min - 1 hour"
145
+ },
146
+ {
147
+ "instance_id": "mwaskom__seaborn-3187",
148
+ "repo": "mwaskom/seaborn",
149
+ "difficulty": "15 min - 1 hour"
150
+ },
151
+ {
152
+ "instance_id": "psf__requests-2931",
153
+ "repo": "psf/requests",
154
+ "difficulty": "15 min - 1 hour"
155
+ }
156
+ ]
157
+ }