Text Generation
Transformers
Safetensors
GGUF
English
Portuguese
qwen3_5
image-text-to-text
qwen
unsloth
lora
code-generation
simplicio-loop
software-engineering
surgical-diff
agentic-coding
conversational
Instructions to use wesleysimplicio/Simplicio-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wesleysimplicio/Simplicio-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wesleysimplicio/Simplicio-27B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("wesleysimplicio/Simplicio-27B") model = AutoModelForMultimodalLM.from_pretrained("wesleysimplicio/Simplicio-27B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use wesleysimplicio/Simplicio-27B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf wesleysimplicio/Simplicio-27B:BF16 # Run inference directly in the terminal: llama cli -hf wesleysimplicio/Simplicio-27B:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf wesleysimplicio/Simplicio-27B:BF16 # Run inference directly in the terminal: llama cli -hf wesleysimplicio/Simplicio-27B:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf wesleysimplicio/Simplicio-27B:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf wesleysimplicio/Simplicio-27B:BF16
Use Docker
docker model run hf.co/wesleysimplicio/Simplicio-27B:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use wesleysimplicio/Simplicio-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wesleysimplicio/Simplicio-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wesleysimplicio/Simplicio-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wesleysimplicio/Simplicio-27B:BF16
- SGLang
How to use wesleysimplicio/Simplicio-27B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "wesleysimplicio/Simplicio-27B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wesleysimplicio/Simplicio-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "wesleysimplicio/Simplicio-27B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wesleysimplicio/Simplicio-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use wesleysimplicio/Simplicio-27B with Ollama:
ollama run hf.co/wesleysimplicio/Simplicio-27B:BF16
- Unsloth Desktop
- Pi
How to use wesleysimplicio/Simplicio-27B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesleysimplicio/Simplicio-27B:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "wesleysimplicio/Simplicio-27B:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use wesleysimplicio/Simplicio-27B with Docker Model Runner:
docker model run hf.co/wesleysimplicio/Simplicio-27B:BF16
- Lemonade
How to use wesleysimplicio/Simplicio-27B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull wesleysimplicio/Simplicio-27B:BF16
Run and chat with the model
lemonade run user.Simplicio-27B-BF16
List all available models
lemonade list
- Hermes Agent
How to use wesleysimplicio/Simplicio-27B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesleysimplicio/Simplicio-27B:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default wesleysimplicio/Simplicio-27B:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use wesleysimplicio/Simplicio-27B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesleysimplicio/Simplicio-27B:BF16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "wesleysimplicio/Simplicio-27B:BF16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Sync from GitHub: allowlist, adapter in lora/, card metadata
Browse fileshttps://github.com/simpletibr/simplicio-27b/commit/e42e364095480d39a2066acd750e28f0371b1b0d
- LICENSE +202 -0
- Modelfile +20 -24
- README.md +134 -81
- generation_config.json +6 -3
LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
Modelfile
CHANGED
|
@@ -1,29 +1,25 @@
|
|
| 1 |
-
# Ollama Modelfile
|
| 2 |
-
#
|
| 3 |
-
# Optimized for: Atomic Search/Replace Diffs & Zero-Token-Waste Execution
|
| 4 |
-
# Quantization recommended: Q4_K_M (~16.8 GB) or Q8_0 (~28.5 GB)
|
| 5 |
|
| 6 |
-
FROM .
|
|
|
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
PARAMETER repeat_penalty 1.1
|
| 13 |
-
PARAMETER num_ctx 32768
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
PARAMETER
|
| 17 |
-
PARAMETER stop "</deliver>"
|
| 18 |
-
PARAMETER stop "<|endoftext|>"
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
SYSTEM """Voce e o Simplicio 27B,
|
|
|
|
| 1 |
+
# Simplicio 27B for Ollama (the only Modelfile): ollama run wesleysimplicio/simplicio-27b --think=false
|
| 2 |
+
# Rebuild: put Qwen3.8-27B.Q4_K_M.gguf from huggingface.co/wesleysimplicio/Simplicio-27B next to this file.
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
# One FROM only. The vision projector (Qwen3.8-27B.BF16-mmproj.gguf) is left out on purpose: Simplicio is used for text only.
|
| 5 |
+
FROM ./Qwen3.8-27B.Q4_K_M.gguf
|
| 6 |
|
| 7 |
+
# Ollama's built-in Qwen 3.5 prompt renderer and tool-call/thinking parser (Ollama >= 0.30.0).
|
| 8 |
+
RENDERER qwen3.5
|
| 9 |
+
PARSER qwen3.5
|
| 10 |
+
REQUIRES 0.30.0
|
|
|
|
|
|
|
| 11 |
|
| 12 |
+
# Same context as vLLM: deploy/context.env MAX_MODEL_LEN.
|
| 13 |
+
PARAMETER num_ctx 40960
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
# Qwen3.8-27B recommended sampling for non-thinking mode (huggingface.co/Qwen/Qwen3.8-27B).
|
| 16 |
+
PARAMETER temperature 0.7
|
| 17 |
+
PARAMETER top_p 0.8
|
| 18 |
+
PARAMETER top_k 20
|
| 19 |
+
PARAMETER min_p 0
|
| 20 |
+
PARAMETER presence_penalty 1.5
|
| 21 |
+
PARAMETER repeat_penalty 1
|
| 22 |
+
PARAMETER stop "<|im_end|>"
|
| 23 |
|
| 24 |
+
# System prompt used in training (notebooks/Simplicio_27B_Training_Colab.ipynb, system_prompt).
|
| 25 |
+
SYSTEM """Voce e o Simplicio 27B, treinado para executar tarefas de desenvolvimento seguindo rigorosamente os 50 pontos do Simplicio-Loop: Orientacao, Planejamento, Edicao Cirurgica por Diff, Validacao e Entrega Verificada sem alucinacao."""
|
README.md
CHANGED
|
@@ -3,7 +3,9 @@ language:
|
|
| 3 |
- en
|
| 4 |
- pt
|
| 5 |
license: apache-2.0
|
|
|
|
| 6 |
base_model: Qwen/Qwen3.8-27B
|
|
|
|
| 7 |
tags:
|
| 8 |
- qwen
|
| 9 |
- unsloth
|
|
@@ -24,7 +26,7 @@ homepage: https://simpleti.com.br/simplicio-27b/
|
|
| 24 |
|
| 25 |
<h1 align="center">Simplicio 27B</h1>
|
| 26 |
|
| 27 |
-
<p align="center">A Qwen3.8-27B fine-tune
|
| 28 |
|
| 29 |
<p align="center">
|
| 30 |
<a href="https://huggingface.co/wesleysimplicio/Simplicio-27B"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Simplicio--27B-yellow.svg" alt="Hugging Face"></a>
|
|
@@ -36,90 +38,81 @@ homepage: https://simpleti.com.br/simplicio-27b/
|
|
| 36 |
|
| 37 |
## Overview
|
| 38 |
|
| 39 |
-
Simplicio 27B is a LoRA fine-tune of [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) by Wesley Simplicio at [SimpleTI](https://simpleti.com.br/simplicio-27b/). It
|
| 40 |
|
| 41 |
- **Base model:** Qwen3.8-27B, 27.36B parameters, 64 layers that alternate linear attention (DeltaNet) and full attention in a 3:1 pattern.
|
| 42 |
-
- **Files on Hugging Face:** the LoRA adapter (0.64 GB), the merged BF16 checkpoint (18 shards, 55.6 GB), and a GGUF Q4_K_M (16.8 GB) with the base model's vision projector (0.93 GB).
|
| 43 |
-
- **Status:** research release. It
|
| 44 |
|
| 45 |
-
##
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|---|---:|
|
| 53 |
-
| Unit test passes | **56/120 (46.7%)** |
|
| 54 |
-
| SEARCH block found, patch applied | 104/120 (86.7%) |
|
| 55 |
-
| Patched file parses (AST) | 104/120 (86.7%) |
|
| 56 |
-
| No call to a nonexistent API | 120/120 |
|
| 57 |
-
| Output tokens per task, mean / max | 69.9 / 103 |
|
| 58 |
-
| Wall time for all 120 tasks | 438 s |
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|---|---:|---:|---:|
|
| 62 |
-
| Surgical diff and AST precision | 30 | 17 | 20 |
|
| 63 |
-
| Edge-case correctness | 30 | 6 | 27 |
|
| 64 |
-
| Nonexistent and deprecated API traps | 30 | 27 | 30 |
|
| 65 |
-
| Adversarial and out-of-distribution | 30 | 6 | 27 |
|
| 66 |
-
|
| 67 |
-
The base model has not been run under this protocol yet, so the gain from fine-tuning is not measured.
|
| 68 |
-
|
| 69 |
-
### Withdrawn numbers
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
- The model is not listed on OpenRouter and has no public per-token price.
|
| 77 |
|
| 78 |
-
The
|
| 79 |
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
|
| 85 |
-
|---|---
|
| 86 |
-
|
|
| 87 |
-
|
|
| 88 |
-
|
|
| 89 |
-
| Simplicio 27B | not evaluated | – | – | – | – |
|
| 90 |
|
| 91 |
-
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
-
```
|
| 96 |
-
|
|
|
|
|
|
|
| 97 |
```
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
The installer installs Ollama if it is missing, then runs the model:
|
| 102 |
-
|
| 103 |
-
```bash
|
| 104 |
-
curl -fsSL https://raw.githubusercontent.com/simpletibr/simplicio-27b/main/install.sh | bash
|
| 105 |
-
```
|
| 106 |
|
| 107 |
### vLLM (OpenAI-compatible server with tool calls)
|
| 108 |
|
| 109 |
```bash
|
|
|
|
| 110 |
git clone https://github.com/simpletibr/simplicio-27b
|
| 111 |
cd simplicio-27b
|
| 112 |
./deploy/serve_vllm.sh wesleysimplicio/Simplicio-27B 8000
|
| 113 |
```
|
| 114 |
|
| 115 |
-
This serves the merged BF16 checkpoint. The weights alone take 55.6 GB
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
-
|
| 118 |
-
- `--chat-template` with [`deploy/chat_template_chatml.jinja`](https://github.com/simpletibr/simplicio-27b/blob/main/deploy/chat_template_chatml.jinja). It prefills `<think>` so that `--reasoning-parser qwen3` moves reasoning out of `content`.
|
| 119 |
-
- `--enable-auto-tool-choice --tool-call-parser simplicio`, using [`deploy/simplicio_tool_parser.py`](https://github.com/simpletibr/simplicio-27b/blob/main/deploy/simplicio_tool_parser.py). It turns `<tool><name>…</name><params>…</params></tool>` into a single `tool_calls` entry.
|
| 120 |
-
- `--served-model-name simplicio-27b simpleti/simplicio-27b`.
|
| 121 |
|
| 122 |
-
|
| 123 |
|
| 124 |
### OpenCode
|
| 125 |
|
|
@@ -143,26 +136,37 @@ Add the vLLM server to `opencode.json` as an OpenAI-compatible provider:
|
|
| 143 |
opencode -m simplicio/simplicio-27b
|
| 144 |
```
|
| 145 |
|
| 146 |
-
OpenCode works through tool calls, so point it at the vLLM server.
|
| 147 |
|
| 148 |
-
### Python (
|
| 149 |
|
| 150 |
-
|
| 151 |
|
| 152 |
```python
|
| 153 |
-
|
|
|
|
| 154 |
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
load_in_4bit=True,
|
| 159 |
-
)
|
| 160 |
-
FastLanguageModel.for_inference(model)
|
| 161 |
|
| 162 |
messages = [{"role": "user", "content": "In api/schemas/user.py, accept tax_id with punctuation such as 123.456.789-00."}]
|
| 163 |
-
inputs = tokenizer.apply_chat_template(
|
| 164 |
-
|
| 165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
```
|
| 167 |
|
| 168 |
## Output format
|
|
@@ -209,12 +213,12 @@ The SEARCH/REPLACE markers are four characters long (`<<<<`, `====`, `>>>>`), no
|
|
| 209 |
|
| 210 |
## Training
|
| 211 |
|
| 212 |
-
The published adapter was produced by [`Simplicio_27B_Training_Colab.ipynb`](https://github.com/simpletibr/simplicio-27b/blob/main/Simplicio_27B_Training_Colab.ipynb). The settings below come from that notebook and the published `adapter_config.json`.
|
| 213 |
|
| 214 |
| Setting | Value |
|
| 215 |
|---|---|
|
| 216 |
| Method | QLoRA with Unsloth; base loaded in 4-bit |
|
| 217 |
-
| LoRA | r 32, alpha 32, dropout 0
|
| 218 |
| Steps | 120 steps, batch size 1, gradient accumulation 8 |
|
| 219 |
| Optimizer | AdamW 8-bit, learning rate 2e-4, cosine schedule, 10 warmup steps, weight decay 0.01 |
|
| 220 |
| Sequence length | 4,096 |
|
|
@@ -222,27 +226,76 @@ The published adapter was produced by [`Simplicio_27B_Training_Colab.ipynb`](htt
|
|
| 222 |
| Data | 101 examples in Portuguese: 1 written by hand and 100 generated from a short list of stack and task templates |
|
| 223 |
| Hardware | Google Colab A100 (40 GB) |
|
| 224 |
|
| 225 |
-
[`train_simplicio_27b.py`](https://github.com/simpletibr/simplicio-27b/blob/
|
| 226 |
|
| 227 |
## Limitations
|
| 228 |
|
| 229 |
-
-
|
| 230 |
-
- The training set is small (101 examples), templated and in Portuguese.
|
| 231 |
- In the training examples, `<validate>` and `<deliver>` contain written-out results such as "2 passed" or "COMMIT_READY". The model writes these without running anything. Treat them as claims and run your own tests.
|
| 232 |
- It has not been compared with the base model under the same protocol, and it has not been run on public benchmarks.
|
|
|
|
|
|
|
| 233 |
- Aider: the patch markers differ from Aider's edit format, and Aider has not been tested.
|
| 234 |
-
- Vision: the
|
| 235 |
|
| 236 |
## Repository
|
| 237 |
|
| 238 |
| Path | Contents |
|
| 239 |
|---|---|
|
| 240 |
-
| `
|
| 241 |
-
| `
|
| 242 |
-
| `
|
| 243 |
-
| `
|
| 244 |
-
| `
|
| 245 |
-
| `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
|
| 247 |
## Citation
|
| 248 |
|
|
|
|
| 3 |
- en
|
| 4 |
- pt
|
| 5 |
license: apache-2.0
|
| 6 |
+
library_name: transformers
|
| 7 |
base_model: Qwen/Qwen3.8-27B
|
| 8 |
+
base_model_relation: finetune
|
| 9 |
tags:
|
| 10 |
- qwen
|
| 11 |
- unsloth
|
|
|
|
| 26 |
|
| 27 |
<h1 align="center">Simplicio 27B</h1>
|
| 28 |
|
| 29 |
+
<p align="center">A Qwen3.8-27B fine-tune trained to answer code-change requests with SEARCH/REPLACE patches instead of whole files.</p>
|
| 30 |
|
| 31 |
<p align="center">
|
| 32 |
<a href="https://huggingface.co/wesleysimplicio/Simplicio-27B"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Simplicio--27B-yellow.svg" alt="Hugging Face"></a>
|
|
|
|
| 38 |
|
| 39 |
## Overview
|
| 40 |
|
| 41 |
+
Simplicio 27B is a LoRA fine-tune of [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) by Wesley Simplicio at [SimpleTI](https://simpleti.com.br/simplicio-27b/). It was trained to answer a code-change request in five tagged phases (`<orient>`, `<plan>`, `<patch>`, `<validate>`, `<deliver>`). The `<patch>` phase holds SEARCH/REPLACE blocks that touch only the lines that change.
|
| 42 |
|
| 43 |
- **Base model:** Qwen3.8-27B, 27.36B parameters, 64 layers that alternate linear attention (DeltaNet) and full attention in a 3:1 pattern.
|
| 44 |
+
- **Files on Hugging Face:** the LoRA adapter in `lora/` (0.64 GB), the merged BF16 checkpoint (18 shards, 55.6 GB), and a GGUF Q4_K_M (16.8 GB) with the base model's vision projector (0.93 GB). Image input is inherited from the base model and has not been evaluated.
|
| 45 |
+
- **Status:** research release. It has not been scored on a reproducible benchmark yet. See [Benchmarks](#benchmarks).
|
| 46 |
|
| 47 |
+
## Benchmarks
|
| 48 |
|
| 49 |
+
No benchmark result is published in this README yet. Numbers that were not produced by a reproducible run have been removed.
|
| 50 |
|
| 51 |
+
In accordance with the pre-registered protocol (ADR 0001):
|
| 52 |
+
- **Pre-registration:** The evaluation protocol is specified in [`PREREG_eval.md`](PREREG_eval.md) with SHA-256 locked in [`PREREG_sha256.txt`](PREREG_sha256.txt).
|
| 53 |
+
- **Audit template:** Release evaluations are published in [`RELEASE_EVAL.md`](RELEASE_EVAL.md) with two-sided 95% Wilson confidence intervals.
|
| 54 |
+
- **Harness:** The benchmark harness is in [`benchmarks/harness/`](https://github.com/simpletibr/simplicio-27b/tree/main/benchmarks/harness). It runs 40 SEARCH/REPLACE tasks against any OpenAI-compatible endpoint. A task passes only when the hidden pytest tests pass on the patched code. A result will be published here only together with its commit, the model file and its checksum, the prompt hash, the decoding settings, and the per-task output.
|
| 55 |
+
- **Quantization Quality Gate:** Quantized builds (FP8, GGUF, AWQ, MLX) are verified against the unquantized baseline via [`benchmarks/quantized_eval.py`](benchmarks/quantized_eval.py) with Wilson 95% bounds.
|
| 56 |
|
| 57 |
+
Not evaluated: SWE-bench, Aider, Terminal-Bench, the Artificial Analysis indices, and image input.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
## Quick start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
+
### Ollama
|
| 62 |
|
| 63 |
+
```bash
|
| 64 |
+
ollama run wesleysimplicio/simplicio-27b --think=false
|
| 65 |
+
```
|
|
|
|
| 66 |
|
| 67 |
+
If Ollama is not installed, get it from [ollama.com/download](https://ollama.com/download). The `latest` tag is built from the root [`Modelfile`](https://github.com/simpletibr/simplicio-27b/blob/main/Modelfile) and needs Ollama 0.30.0 or newer. The Modelfile uses the Q4_K_M GGUF and leaves the base model's vision projector out on purpose: Simplicio is used for text only. The published tag's manifest lists a projector layer too, so the two do not match yet. Image input has not been evaluated. It sets:
|
| 68 |
|
| 69 |
+
- `RENDERER qwen3.5` and `PARSER qwen3.5`: Ollama's built-in Qwen 3.5 prompt format. Tool calls come back in `message.tool_calls` and reasoning in `message.thinking`.
|
| 70 |
+
- `num_ctx 40960`: a 40,960-token context, the same as vLLM ([`deploy/context.env`](https://github.com/simpletibr/simplicio-27b/blob/main/deploy/context.env)).
|
| 71 |
+
- Qwen's recommended sampling for Qwen3.8-27B in non-thinking mode: `temperature 0.7`, `top_p 0.8`, `top_k 20`, `min_p 0`, `presence_penalty 1.5`, `repeat_penalty 1`. The benchmark harness uses greedy decoding, so to match it send `"options": {"temperature": 0}`. The tag stops only at `<|im_end|>`; add `"stop": ["</deliver>"]` inside `options` to also stop at the end of the answer.
|
| 72 |
+
- The system prompt used in training (see "Prompt format" below).
|
| 73 |
|
| 74 |
+
**Thinking.** The training data has no `<think>` blocks, so run with thinking off. Ollama turns thinking on by default for models that support it, so turn it off on every request:
|
| 75 |
|
| 76 |
+
| Client | Thinking off |
|
| 77 |
+
|---|---|
|
| 78 |
+
| `ollama run` | `--think=false`, or `/set nothink` inside a session |
|
| 79 |
+
| `/api/chat` | `"think": false` |
|
| 80 |
+
| `/v1/chat/completions` | `"reasoning_effort": "none"` |
|
|
|
|
| 81 |
|
| 82 |
+
With thinking on, the model reasons first and the reasoning goes to `message.thinking`. That mode has not been evaluated.
|
| 83 |
|
| 84 |
+
**Prompt format.** Training used this system prompt and user message. Ollama adds the system prompt by itself; with vLLM or transformers, send it as the `system` message:
|
| 85 |
|
| 86 |
+
```text
|
| 87 |
+
system: Voce e o Simplicio 27B, treinado para executar tarefas de desenvolvimento seguindo rigorosamente os 50 pontos do Simplicio-Loop: Orientacao, Planejamento, Edicao Cirurgica por Diff, Validacao e Entrega Verificada sem alucinacao.
|
| 88 |
+
user: Contexto: <files, stack and bug report>
|
| 89 |
+
Tarefa: <the change to make>
|
| 90 |
```
|
| 91 |
|
| 92 |
+
**Not evaluated.** The Q4_K_M file has not been scored. Image input has not been evaluated. Training was text-only. The training data has no tool calls, so tool calling is whatever the base model does.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
### vLLM (OpenAI-compatible server with tool calls)
|
| 95 |
|
| 96 |
```bash
|
| 97 |
+
pip install vllm==0.31.0
|
| 98 |
git clone https://github.com/simpletibr/simplicio-27b
|
| 99 |
cd simplicio-27b
|
| 100 |
./deploy/serve_vllm.sh wesleysimplicio/Simplicio-27B 8000
|
| 101 |
```
|
| 102 |
|
| 103 |
+
This serves the merged BF16 checkpoint. The weights alone take 55.6 GB. [`deploy/serve_vllm.sh`](https://github.com/simpletibr/simplicio-27b/blob/main/deploy/serve_vllm.sh) is the only serve command, and the Colab notebook runs it too. It sets:
|
| 104 |
+
|
| 105 |
+
- `--max-model-len 40960`, defined once in [`deploy/context.env`](https://github.com/simpletibr/simplicio-27b/blob/main/deploy/context.env): the total context window.
|
| 106 |
+
- No `--chat-template`: vLLM uses the model's own `chat_template.jinja`.
|
| 107 |
+
- `--default-chat-template-kwargs '{"enable_thinking": false}'`: thinking is off by default because the training data has no `<think>` blocks. A request can turn it on with `"chat_template_kwargs": {"enable_thinking": true}`.
|
| 108 |
+
- `--enable-auto-tool-choice --tool-call-parser qwen3_coder --reasoning-parser qwen3`: vLLM's built-in parsers for Qwen's native `<tool_call><function=…>` format.
|
| 109 |
+
- `--enable-force-include-usage`: every response carries `usage`.
|
| 110 |
+
- `--served-model-name simplicio-27b simpleti/simplicio-27b`: both ids reach the same fine-tuned weights.
|
| 111 |
+
- Listens on `127.0.0.1` by default. To serve other machines, put an HTTPS proxy in front that forwards only `GET /v1/models` and `POST /v1/chat/completions`, and set `VLLM_API_KEY=<random token>` so vLLM requires `Authorization: Bearer <token>` on `/v1/*`.
|
| 112 |
|
| 113 |
+
`vllm serve` has no stop flag. `<|im_end|>` already ends generation through `generation_config.json`; to end at `</deliver>`, send `"stop": ["</deliver>"]` in the request.
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
+
[`notebooks/Simplicio_27B_Serve_Colab.ipynb`](https://github.com/simpletibr/simplicio-27b/blob/main/notebooks/Simplicio_27B_Serve_Colab.ipynb) runs the same script on a Colab G4 (RTX PRO 6000, 96 GB) behind the completion gate and a Cloudflare tunnel.
|
| 116 |
|
| 117 |
### OpenCode
|
| 118 |
|
|
|
|
| 136 |
opencode -m simplicio/simplicio-27b
|
| 137 |
```
|
| 138 |
|
| 139 |
+
OpenCode works through tool calls, so point it at the vLLM server. OpenCode has not been tested against the Ollama tag.
|
| 140 |
|
| 141 |
+
### Python (Transformers)
|
| 142 |
|
| 143 |
+
The Hugging Face repository root is a plain Transformers checkpoint: the merged BF16 weights (55.6 GB). `do_sample=False` is greedy decoding, the setting the benchmark harness uses; without it, `generate` uses the sampling defaults in `generation_config.json`, the same values as the Ollama `Modelfile`.
|
| 144 |
|
| 145 |
```python
|
| 146 |
+
import torch
|
| 147 |
+
from transformers import AutoModelForImageTextToText, AutoTokenizer
|
| 148 |
|
| 149 |
+
repo = "wesleysimplicio/Simplicio-27B"
|
| 150 |
+
tokenizer = AutoTokenizer.from_pretrained(repo)
|
| 151 |
+
model = AutoModelForImageTextToText.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
messages = [{"role": "user", "content": "In api/schemas/user.py, accept tax_id with punctuation such as 123.456.789-00."}]
|
| 154 |
+
inputs = tokenizer.apply_chat_template(
|
| 155 |
+
messages, add_generation_prompt=True, enable_thinking=False, return_tensors="pt"
|
| 156 |
+
).to(model.device)
|
| 157 |
+
output = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
|
| 158 |
+
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
The LoRA adapter is in [`lora/`](https://huggingface.co/wesleysimplicio/Simplicio-27B/tree/main/lora). To apply it to your own copy of the base model, load the base with `AutoModelForImageTextToText`, the class whose module names (`model.language_model.layers.*`) match the adapter:
|
| 162 |
+
|
| 163 |
+
```python
|
| 164 |
+
import torch
|
| 165 |
+
from peft import PeftModel
|
| 166 |
+
from transformers import AutoModelForImageTextToText
|
| 167 |
+
|
| 168 |
+
base = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3.8-27B", dtype=torch.bfloat16, device_map="auto")
|
| 169 |
+
model = PeftModel.from_pretrained(base, "wesleysimplicio/Simplicio-27B", subfolder="lora")
|
| 170 |
```
|
| 171 |
|
| 172 |
## Output format
|
|
|
|
| 213 |
|
| 214 |
## Training
|
| 215 |
|
| 216 |
+
The published adapter was produced by [`notebooks/Simplicio_27B_Training_Colab.ipynb`](https://github.com/simpletibr/simplicio-27b/blob/main/notebooks/Simplicio_27B_Training_Colab.ipynb). The settings below come from that notebook and the published `lora/adapter_config.json`.
|
| 217 |
|
| 218 |
| Setting | Value |
|
| 219 |
|---|---|
|
| 220 |
| Method | QLoRA with Unsloth; base loaded in 4-bit |
|
| 221 |
+
| LoRA | r 32, alpha 32, dropout 0. q, k, v, o projections on the 16 full-attention layers (3, 7, …, 63); gate, up, down projections on all 64 layers. The `linear_attn` projections of the 48 DeltaNet layers and the vision tower were not adapted (512 LoRA tensors in the published adapter) |
|
| 222 |
| Steps | 120 steps, batch size 1, gradient accumulation 8 |
|
| 223 |
| Optimizer | AdamW 8-bit, learning rate 2e-4, cosine schedule, 10 warmup steps, weight decay 0.01 |
|
| 224 |
| Sequence length | 4,096 |
|
|
|
|
| 226 |
| Data | 101 examples in Portuguese: 1 written by hand and 100 generated from a short list of stack and task templates |
|
| 227 |
| Hardware | Google Colab A100 (40 GB) |
|
| 228 |
|
| 229 |
+
An earlier script, [`train_simplicio_27b.py`](https://github.com/simpletibr/simplicio-27b/blob/b8567df/train_simplicio_27b.py), was removed because its defaults do not reproduce the published adapter: 150 steps, the bottom 48 layers frozen, and the 10 phase tags added as special tokens. The published adapter used none of these, and its tokenizer has no added tokens. [`generate_dataset.py`](https://github.com/simpletibr/simplicio-27b/blob/main/generate_dataset.py) writes `data/simplicio_loop_50pts_train.jsonl` (80 examples) and `data/simplicio_loop_50pts_val.jsonl` (15 examples).
|
| 230 |
|
| 231 |
## Limitations
|
| 232 |
|
| 233 |
+
- No functional correctness of the patches has been measured yet.
|
| 234 |
+
- The training set is small (101 examples), templated and in Portuguese. Whether outputs follow the five-phase format was not measured.
|
| 235 |
- In the training examples, `<validate>` and `<deliver>` contain written-out results such as "2 passed" or "COMMIT_READY". The model writes these without running anything. Treat them as claims and run your own tests.
|
| 236 |
- It has not been compared with the base model under the same protocol, and it has not been run on public benchmarks.
|
| 237 |
+
- No checkpoint has been evaluated yet. The BF16 weights, the Q4_K_M GGUF, the Ollama template and parameters, and the 4-bit base + LoRA path are all unmeasured.
|
| 238 |
+
- Decoding: the benchmark harness is greedy (temperature 0). The sampling defaults in the Hugging Face `generation_config.json` and in the Ollama tag are not greedy and have not been measured.
|
| 239 |
- Aider: the patch markers differ from Aider's edit format, and Aider has not been tested.
|
| 240 |
+
- Vision: the Hugging Face repository ships the base model's vision projector as a separate file. The Modelfile leaves it out, but the published Ollama manifest lists it. Training was text-only, and image input has not been evaluated.
|
| 241 |
|
| 242 |
## Repository
|
| 243 |
|
| 244 |
| Path | Contents |
|
| 245 |
|---|---|
|
| 246 |
+
| `scripts/hf_publish.py` | Syncs the Hugging Face repo with this one: file allowlist, adapter in `lora/`, one commit that only adds and updates files, never deletes on the Hub; dry-run by default, `--publish` needs `HF_TOKEN` |
|
| 247 |
+
| `lora/` | Where the LoRA adapter goes (`adapter_config.json`, `adapter_model.safetensors`); the weights are not in git |
|
| 248 |
+
| `notebooks/Simplicio_27B_Training_Colab.ipynb` | Training run that produced the adapter |
|
| 249 |
+
| `notebooks/Simplicio_27B_Merge_Colab.ipynb` | Merges the adapter into 16-bit weights and exports the GGUF Q4_K_M |
|
| 250 |
+
| `notebooks/Simplicio_27B_Serve_Colab.ipynb`, `deploy/` | vLLM serve script, Colab launcher, completion gate, context length |
|
| 251 |
+
| `gateway/` | Gateway code kept in the repo: `set_upstream.php`, `upstream_lease.php` (heartbeat lease: HTTP 503 when the Colab stops renewing), `status.php` (`GET /v1/status`), and `build_catalog.py`, which writes `models.json` (`GET /v1/models`) |
|
| 252 |
+
| `Modelfile` | The Ollama tag `wesleysimplicio/simplicio-27b` |
|
| 253 |
+
| `data/unseen_eval_120.json` | The 120 rows of the held-out set (40 unique tasks) |
|
| 254 |
+
| `benchmarks/harness/` | Benchmark harness: 40 SEARCH/REPLACE tasks with hidden tests |
|
| 255 |
+
| `tests/` | Tests for the serving code: `python3 -m unittest discover -s tests` |
|
| 256 |
+
|
| 257 |
+
## Development
|
| 258 |
+
|
| 259 |
+
`make check` needs `python3`, `ruff`, `shellcheck`, `php` and `make` on the `PATH`.
|
| 260 |
+
|
| 261 |
+
```bash
|
| 262 |
+
make check # unittest, ruff F/E9, shellcheck, php -l, vLLM args
|
| 263 |
+
git config core.hooksPath .githooks # once per clone: run make check before every push
|
| 264 |
+
```
|
| 265 |
+
|
| 266 |
+
The last step parses the exact `vllm serve` argv from `deploy/serve_vllm.sh` with vLLM's own CLI parser, so it needs `vllm==0.31.0` importable. Without vLLM installed it fails with exit code 1 on purpose: a flag that vLLM does not accept must not pass the gate unnoticed. On a machine without vLLM, export `SIMPLICIO_SKIP_VLLM_ARGS=1` to skip only that check (it prints `SKIP: vllm not importable; argv extracted, not validated`); the other four steps still run. There is no CI: all checks run locally. Commit subjects are one plain sentence, without a `type:` prefix. Colab notebooks live in `notebooks/`; `tests/test_layout.py` fails on a notebook at the repository root or on a `blob/main` link to a missing file.
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
## Agent integration (MCP)
|
| 270 |
+
|
| 271 |
+
Simplicio 27B provides a native Model Context Protocol (MCP) server over stdio in [`scripts/mcp_server.py`](scripts/mcp_server.py) with zero external dependencies.
|
| 272 |
+
|
| 273 |
+
### Tools
|
| 274 |
+
|
| 275 |
+
- `apply_surgical_diff`: Atomically applies SEARCH/REPLACE diff blocks to target files with rollback on mismatch.
|
| 276 |
+
- `validate_patch`: Validates diff block structure and syntax offline without modifying files.
|
| 277 |
+
- `format_prompt`: Renders structured prompts conforming to the Simplicio-Loop (`<orient>`, `<plan>`, `<patch>`, `<validate>`, `<deliver>`).
|
| 278 |
+
|
| 279 |
+
### Diff format compatibility
|
| 280 |
+
|
| 281 |
+
The server natively accepts both standard diff formats:
|
| 282 |
+
- **Aider standard (7-char):** `<<<<<<< SEARCH`, `=======`, `>>>>>>> REPLACE`
|
| 283 |
+
- **Simplicio compact (4-char):** `<<<<`, `====`, `>>>>`
|
| 284 |
+
|
| 285 |
+
### MCP configuration
|
| 286 |
+
|
| 287 |
+
Add to your MCP client configuration (Claude Desktop, Claude Code, Cursor):
|
| 288 |
+
|
| 289 |
+
```json
|
| 290 |
+
{
|
| 291 |
+
"mcpServers": {
|
| 292 |
+
"simplicio": {
|
| 293 |
+
"command": "python3",
|
| 294 |
+
"args": ["scripts/mcp_server.py"]
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
}
|
| 298 |
+
```
|
| 299 |
|
| 300 |
## Citation
|
| 301 |
|
generation_config.json
CHANGED
|
@@ -6,8 +6,11 @@
|
|
| 6 |
248044
|
| 7 |
],
|
| 8 |
"pad_token_id": 248044,
|
| 9 |
-
"
|
|
|
|
|
|
|
| 10 |
"top_k": 20,
|
| 11 |
-
"
|
| 12 |
-
"
|
|
|
|
| 13 |
}
|
|
|
|
| 6 |
248044
|
| 7 |
],
|
| 8 |
"pad_token_id": 248044,
|
| 9 |
+
"transformers_version": "5.5.0",
|
| 10 |
+
"temperature": 0.7,
|
| 11 |
+
"top_p": 0.8,
|
| 12 |
"top_k": 20,
|
| 13 |
+
"min_p": 0.0,
|
| 14 |
+
"presence_penalty": 1.5,
|
| 15 |
+
"repetition_penalty": 1.0
|
| 16 |
}
|