Image-Text-to-Text
Safetensors
GGUF
Portuguese
English
gemma4
code
vision
multimodal
software-engineering
react-native
android
typescript
python
unsloth
conversational
Instructions to use SpaceGhost/SpaceCode-E2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SpaceGhost/SpaceCode-E2B 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 SpaceGhost/SpaceCode-E2B:Q4_K_M # Run inference directly in the terminal: llama cli -hf SpaceGhost/SpaceCode-E2B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SpaceGhost/SpaceCode-E2B:Q4_K_M # Run inference directly in the terminal: llama cli -hf SpaceGhost/SpaceCode-E2B: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 SpaceGhost/SpaceCode-E2B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf SpaceGhost/SpaceCode-E2B:Q4_K_M
Use Docker
docker model run hf.co/SpaceGhost/SpaceCode-E2B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use SpaceGhost/SpaceCode-E2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SpaceGhost/SpaceCode-E2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SpaceGhost/SpaceCode-E2B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/SpaceGhost/SpaceCode-E2B:Q4_K_M
- Ollama
How to use SpaceGhost/SpaceCode-E2B with Ollama:
ollama run hf.co/SpaceGhost/SpaceCode-E2B:Q4_K_M
- Unsloth Desktop
- Pi
How to use SpaceGhost/SpaceCode-E2B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SpaceGhost/SpaceCode-E2B: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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SpaceGhost/SpaceCode-E2B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SpaceGhost/SpaceCode-E2B with Docker Model Runner:
docker model run hf.co/SpaceGhost/SpaceCode-E2B:Q4_K_M
- Lemonade
How to use SpaceGhost/SpaceCode-E2B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SpaceGhost/SpaceCode-E2B:Q4_K_M
Run and chat with the model
lemonade run user.SpaceCode-E2B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use SpaceGhost/SpaceCode-E2B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SpaceGhost/SpaceCode-E2B: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:8080/v1 hermes config set model.default SpaceGhost/SpaceCode-E2B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SpaceGhost/SpaceCode-E2B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SpaceGhost/SpaceCode-E2B: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:8080/v1 \ --custom-model-id "SpaceGhost/SpaceCode-E2B: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"
docs: update README.md for unified SpaceCode-E2B repository
Browse files
README.md
CHANGED
|
@@ -23,56 +23,57 @@ language:
|
|
| 23 |
pipeline_tag: image-text-to-text
|
| 24 |
---
|
| 25 |
|
| 26 |
-
# SpaceCode-E2B
|
| 27 |
|
| 28 |
-
**SpaceCode-E2B
|
| 29 |
|
| 30 |
---
|
| 31 |
|
| 32 |
-
##
|
| 33 |
|
| 34 |
-
|
| 35 |
-
- **Arquitetura**: Multimodal (Visão + Texto) e Geração de Código
|
| 36 |
-
- **Janela de Contexto**: 128K tokens
|
| 37 |
-
- **Método de Ajuste**: QLoRA 4-bit SFT
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
- Identificação de regressões visuais e problemas de layout em **React / TypeScript / Tailwind CSS** e **Flutter / Dart**.
|
| 45 |
-
- Geração de diagnósticos de causa raiz, patches em formato *Unified Diff* e código corrigido.
|
| 46 |
-
2. **Engenharia de Software Políglota**:
|
| 47 |
-
- Suporte a **TypeScript, Python, Dart/Flutter, SQL, Java, Go, C#, Rust e Bash**.
|
| 48 |
-
- Correção de bugs com análise de causa raiz, refatoração estrutural, geração de testes unitários, revisão de código (segurança e boas práticas) e decisões de arquitetura.
|
| 49 |
|
| 50 |
---
|
| 51 |
|
| 52 |
## 🚀 Como Executar
|
| 53 |
|
| 54 |
-
### Via Ollama
|
| 55 |
```bash
|
| 56 |
-
ollama run hf.co/SpaceGhost/SpaceCode-E2B
|
| 57 |
```
|
| 58 |
|
| 59 |
-
### Via `llama.cpp`
|
| 60 |
```bash
|
| 61 |
-
llama-cli -hf SpaceGhost/SpaceCode-E2B
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
```
|
| 63 |
|
| 64 |
---
|
| 65 |
|
| 66 |
-
##
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
| 73 |
|
| 74 |
---
|
| 75 |
|
| 76 |
## ⚠️ Atribuição
|
| 77 |
|
| 78 |
-
- *SpaceCode-E2B
|
|
|
|
| 23 |
pipeline_tag: image-text-to-text
|
| 24 |
---
|
| 25 |
|
| 26 |
+
# SpaceCode-E2B
|
| 27 |
|
| 28 |
+
**SpaceCode-E2B** é um modelo de Engenharia de Software e Reparo Visual de Interfaces derivado do **Google Gemma 4 E2B (`google/gemma-4-E2B-it`)**, ajustado via QLoRA SFT com [Unsloth](https://github.com/unslothai/unsloth) pela **SpaceGhost**.
|
| 29 |
|
| 30 |
---
|
| 31 |
|
| 32 |
+
## 📦 Estrutura Unificada do Repositório
|
| 33 |
|
| 34 |
+
Este repositório centraliza todos os formatos oficiais do modelo para inferência local, inferência multimodal e continuidade de treinamento:
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
+
| Caminho no Repositório | Formato | Finalidade |
|
| 37 |
+
| :--- | :--- | :--- |
|
| 38 |
+
| `Q4_K_M.gguf` | **GGUF (`Q4_K_M`)** | Inferência rápida local via **Ollama** e **`llama.cpp`** |
|
| 39 |
+
| `model.safetensors` | **Safetensors (16-bit)** | Modelo completo (Visão + Texto) para inferência multimodal ou base de novos treinamentos |
|
| 40 |
+
| `lora/` | **QLoRA Adapter** | Adaptador LoRA e processador para treino incremental (`subfolder="lora"`) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
## 🚀 Como Executar
|
| 45 |
|
| 46 |
+
### 1. Via Ollama (GGUF `Q4_K_M`)
|
| 47 |
```bash
|
| 48 |
+
ollama run hf.co/SpaceGhost/SpaceCode-E2B:Q4_K_M
|
| 49 |
```
|
| 50 |
|
| 51 |
+
### 2. Via `llama.cpp`
|
| 52 |
```bash
|
| 53 |
+
llama-cli -hf SpaceGhost/SpaceCode-E2B:Q4_K_M --jinja
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
### 3. Via Unsloth / Transformers (16-bit Multimodal ou Continuidade de Treino)
|
| 57 |
+
```python
|
| 58 |
+
from unsloth import FastVisionModel
|
| 59 |
+
|
| 60 |
+
# Carregar modelo 16-bit completo da raiz:
|
| 61 |
+
model, processor = FastVisionModel.from_pretrained("SpaceGhost/SpaceCode-E2B", load_in_4bit=True)
|
| 62 |
```
|
| 63 |
|
| 64 |
---
|
| 65 |
|
| 66 |
+
## 🎯 Capacidades Principais
|
| 67 |
|
| 68 |
+
1. **Diagnóstico e Reparo de Interfaces (UI/UX & Frontend/Mobile)**:
|
| 69 |
+
- Identificação de regressões visuais e problemas de layout em **React / TypeScript / Tailwind CSS** e **Flutter / Dart**.
|
| 70 |
+
- Geração de diagnósticos de causa raiz, patches em formato *Unified Diff* e código corrigido.
|
| 71 |
+
2. **Engenharia de Software Políglota**:
|
| 72 |
+
- Suporte a **TypeScript, Python, Dart/Flutter, SQL, Java, Go, C#, Rust e Bash**.
|
| 73 |
+
- Correção de bugs com análise de causa raiz, refatoração estrutural, geração de testes unitários, revisão de código (segurança e boas práticas) e decisões de arquitetura.
|
| 74 |
|
| 75 |
---
|
| 76 |
|
| 77 |
## ⚠️ Atribuição
|
| 78 |
|
| 79 |
+
- *SpaceCode-E2B is a fine-tuned derivative of Google Gemma 4 E2B (`google/gemma-4-E2B-it`).*
|