Text Generation
Transformers
Safetensors
GGUF
Spanish
English
code
code-generation
qwen2
lora
conversational
Instructions to use Korzadi/Atomic-Code-1.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Korzadi/Atomic-Code-1.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Korzadi/Atomic-Code-1.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Korzadi/Atomic-Code-1.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Korzadi/Atomic-Code-1.1 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 Korzadi/Atomic-Code-1.1:Q4_K_M # Run inference directly in the terminal: llama cli -hf Korzadi/Atomic-Code-1.1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Korzadi/Atomic-Code-1.1:Q4_K_M # Run inference directly in the terminal: llama cli -hf Korzadi/Atomic-Code-1.1:Q4_K_M
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 Korzadi/Atomic-Code-1.1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Korzadi/Atomic-Code-1.1:Q4_K_M
Use Docker
docker model run hf.co/Korzadi/Atomic-Code-1.1:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Korzadi/Atomic-Code-1.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Korzadi/Atomic-Code-1.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Korzadi/Atomic-Code-1.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Korzadi/Atomic-Code-1.1:Q4_K_M
- SGLang
How to use Korzadi/Atomic-Code-1.1 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 "Korzadi/Atomic-Code-1.1" \ --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": "Korzadi/Atomic-Code-1.1", "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 "Korzadi/Atomic-Code-1.1" \ --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": "Korzadi/Atomic-Code-1.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Korzadi/Atomic-Code-1.1 with Ollama:
ollama run hf.co/Korzadi/Atomic-Code-1.1:Q4_K_M
- Unsloth Desktop
- Pi
How to use Korzadi/Atomic-Code-1.1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Korzadi/Atomic-Code-1.1:Q4_K_M
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": "Korzadi/Atomic-Code-1.1:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Korzadi/Atomic-Code-1.1 with Docker Model Runner:
docker model run hf.co/Korzadi/Atomic-Code-1.1:Q4_K_M
- Lemonade
How to use Korzadi/Atomic-Code-1.1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Korzadi/Atomic-Code-1.1:Q4_K_M
Run and chat with the model
lemonade run user.Atomic-Code-1.1-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Korzadi/Atomic-Code-1.1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Korzadi/Atomic-Code-1.1:Q4_K_M
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 Korzadi/Atomic-Code-1.1:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Korzadi/Atomic-Code-1.1 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Korzadi/Atomic-Code-1.1:Q4_K_M
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 "Korzadi/Atomic-Code-1.1:Q4_K_M" \ --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"
File size: 6,913 Bytes
4f4b556 4117634 253972a 4117634 253972a 4f4b556 4117634 253972a 4117634 253972a 4117634 4f4b556 253972a 4f4b556 253972a 4f4b556 253972a 4f4b556 253972a 4f4b556 253972a 4f4b556 253972a 4f4b556 253972a 4f4b556 4117634 4f4b556 253972a 4f4b556 253972a 4f4b556 253972a 4f4b556 253972a 4f4b556 4117634 253972a 4f4b556 253972a 4117634 253972a 4117634 4f4b556 253972a 4117634 4f4b556 253972a 4117634 253972a 4117634 253972a 9aab28e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | ---
language:
- es
- en
license: apache-2.0
library_name: transformers
tags:
- code
- code-generation
- qwen2
- lora
- gguf
base_model: Qwen/Qwen2.5-Coder-7B-Instruct
model_creator: Korzadi
model_name: Atomic Code 1.1
pipeline_tag: text-generation
---
# Atomic Code 1.1
**Atomic Code 1.1** es la distribución oficial, completa e independiente de la familia de modelos **Atomic**, entrenada por **Korzadi**. Este repositorio unifica la experiencia de despliegue ofreciendo los pesos completos fusionados de alta precisión, el adaptador LoRA original para desarrollo flexible y versiones optimizadas en formato GGUF.
## 🪐 Estructura de la Distribución
Para garantizar la máxima flexibilidad sin colisiones en el ecosistema Hugging Face, el repositorio se organiza de la siguiente manera:
1. **Pesos Consolidados (Modelo Completo):** Ubicados bajo la carpeta `consolidated/` en precisión `bfloat16`/`float16` nativa, listos para cargarse directamente en entornos de producción con `transformers`.
2. **Adaptador LoRA Original:** Ubicado en la raíz (`adapter_model.safetensors` y `adapter_config.json`) para cargas dinámicas usando PEFT con Unsloth sobre `Qwen2.5-Coder-7B-Instruct`.
3. **Cuantizaciones GGUF:** Disponibles en la carpeta `gguf/` para inferencia local rápida en CPU/Edge usando `llama.cpp` u `Ollama`.
---
## 📊 Ficha Técnica y Especificaciones
| Parámetro | Valor de Especificación |
| :--- | :--- |
| **Creador / Autor** | Korzadi |
| **Arquitectura Base** | Qwen2 (`Qwen2ForCausalLM`) |
| **Modelo Base de Origen** | Qwen2.5-Coder-7B-Instruct |
| **Tamaño de Parámetros** | ~7.61 Billones |
| **Dimensión Oculta (Hidden Size)** | 3584 |
| **Tamaño de Vocabulario** | 152064 |
| **Longitud de Contexto** | 32,768 tokens (ampliable) |
| **Formato de Pesos** | Safetensors |
| **Dtype de Inferencia Recomendado** | `bfloat16` o `float16` |
---
## 🛠️ Guía de Uso e Inferencia (Transformers)
### 1. Cargar el Modelo Completo Consolidado
Para ejecutar la versión de pesos consolidados e independientes directamente desde la subcarpeta dedicada:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Korzadi/Atomic-Code-1.1"
# Carga del tokenizador y el modelo consolidado
tokenizer = AutoTokenizer.from_pretrained(model_id, subfolder="consolidated")
model = AutoModelForCausalLM.from_pretrained(
model_id,
subfolder="consolidated",
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Prompt de ejemplo
prompt = "Escribe una función en Python para validar una dirección IP v4 y v6."
messages = [
{"role": "system", "content": "Eres Atomic Code, un asistente de programación experto de nivel Senior."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=512)
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
```
### 2. Cargar como Adaptador PEFT / LoRA
Si deseas utilizar el adaptador ligero cargándolo dinámicamente sobre la base original:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_id = "Qwen/Qwen2.5-Coder-7B-Instruct"
adapter_id = "Korzadi/Atomic-Code-1.1"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(base_model_id, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(base_model, adapter_id)
```
---
## 🎛️ Configuración para Ollama y Llama.cpp
Para ejecutar el modelo localmente utilizando el archivo unificado `atomic-code-Q4_K_M.gguf` provisto en el repositorio, crea un archivo `Modelfile`:
```dockerfile
FROM ./gguf/atomic-code-Q4_K_M.gguf
# Configurar parámetros del sistema
PARAMETER temperature 0.2
PARAMETER top_p 0.95
PARAMETER stop <|im_start|>
PARAMETER stop <|im_end|>
TEMPLATE """<|im_start|>system
Eres Atomic Code, un asistente de programación altamente calificado creado por Korzadi.<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
```
Ejecuta en tu terminal:
```bash
ollama create atomic-code-1.1 -f Modelfile
ollama run atomic-code-1.1
```
---
## 📝 Historial de Versiones e Integridad
- **v1.0 (Free):** Publicación inicial de distribución.
- **v1.1 (Active Adapter):** Ajuste fino de precisión entrenado mediante QLoRA y Unsloth enfocado en el dominio de desarrollo de software.
- **v1.2 (Consolidated):** Fusión completa de pesos consolidados en topología FP16/BF16 para garantizar compatibilidad nativa sin capas de adaptación adicionales.
## 📄 Licencia
Este modelo se distribuye bajo la licencia **Apache 2.0**.
---
*Ficha oficial generada para el ecosistema Korzadi / Atomic.*
## 🚀 Cómo usar Atomic Code 1.1
### Opción 1: Carga del Checkpoint Completo Consolidado (BF16)
Para cargar la versión consolidada y ajustada del modelo completo (sin necesidad de cargar adaptadores por separado), debes apuntar explícitamente a la subcarpeta `consolidated`:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Korzadi/Atomic-Code-1.1"
# Carga de Tokenizer y Modelo especificando subfolder
tokenizer = AutoTokenizer.from_pretrained(model_id, subfolder="consolidated")
model = AutoModelForCausalLM.from_pretrained(
model_id,
subfolder="consolidated",
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Inferencia
messages = [
{"role": "system", "content": "You are Atomic Code, an advanced coding assistant."},
{"role": "user", "content": "Escribe una función de ordenamiento rápido en Python."}
]
formatted_chat = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(formatted_chat, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
```
### Opción 2: Carga mediante Adaptador LoRA (PEFT)
Si prefieres utilizar el adaptador LoRA sobre el modelo base original de Qwen:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_id = "Qwen/Qwen2.5-Coder-7B-Instruct"
adapter_id = "Korzadi/Atomic-Code-1.1"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_id)
```
### Opción 3: Inferencia local con GGUF (llama.cpp)
El modelo de cuantización intermedia recomendado está disponible en:
`gguf/atomic-code-Q4_K_M.gguf`
|