Instructions to use kiel2/kiel-2-codex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kiel2/kiel-2-codex with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("kiel2/kiel-2-codex") model = PeftModel.from_pretrained(base_model, "kiel2/kiel-2-codex") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- qwen3-vl
|
| 7 |
+
- vision-language
|
| 8 |
+
- gguf
|
| 9 |
+
- quantization
|
| 10 |
+
- multimodal
|
| 11 |
+
- kielgen-codex
|
| 12 |
+
base_model: Qwen/Qwen3-VL-4B
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# KielGen-Codex (Qwen3-VL-4B GGUF)
|
| 16 |
+
|
| 17 |
+
`KielGen-Codex` is a fine-tuned multimodal vision-language model (`Qwen3VLForConditionalGeneration`) optimized for advanced visual understanding and generation pipelines. This repository contains the official GGUF-formatted weights, compiled in both full-precision FP16 and optimized 4-bit (`Q4_K_M`) formats for fast, low-memory local deployment using `llama.cpp` or compatible runtimes.
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## 📁 Available Model Files
|
| 22 |
+
|
| 23 |
+
| Filename | Quantization | Size | Description |
|
| 24 |
+
| :--- | :--- | :--- | :--- |
|
| 25 |
+
| `merged_qwen3_vl_4b_f16.gguf` | FP16 | ~7.67 GB | Full-precision unquantized export preserving maximum native fidelity. |
|
| 26 |
+
| `merged_qwen3_vl_4b_q4_k_m.gguf` | Q4_K_M | ~2.38 GB | Optimized 4-bit medium quantization (~4.95 BPW), ideal for consumer hardware and edge setups. |
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
## 🛠️ Model Architecture & Technical Specs
|
| 31 |
+
|
| 32 |
+
* **Base Architecture**: Qwen3-VL (Vision-Language)
|
| 33 |
+
* **Transformer Layers**: 36 blocks (`blk.0` through `blk.35`)
|
| 34 |
+
* **Embedding / Hidden Dimension**: 2560
|
| 35 |
+
* **Supported Modalties**: Text & Vision
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## 🚀 Quickstart Usage
|
| 40 |
+
|
| 41 |
+
You can run this model directly using `llama.cpp` or compatible UI clients/backends.
|
| 42 |
+
|
| 43 |
+
### 1. Running with `llama.cpp` (CLI)
|
| 44 |
+
Clone and build `llama.cpp`, then run inference with the quantized GGUF model:
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
# Clone llama.cpp if you haven't already
|
| 48 |
+
git clone [https://github.com/ggerganov/llama.cpp.git](https://github.com/ggerganov/llama.cpp.git)
|
| 49 |
+
cd llama.cpp
|
| 50 |
+
cmake -B build -S . && cmake --build build --config Release -j$(nproc)
|
| 51 |
+
|
| 52 |
+
# Run interactive inference (adjust paths as needed)
|
| 53 |
+
./build/bin/llama-cli -m ../merged_qwen3_vl_4b_q4_k_m.gguf \
|
| 54 |
+
--prompt "Describe the uploaded image:" \
|
| 55 |
+
--image path_to_image.jpg \
|
| 56 |
+
-n 512
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
2. Python Integration
|
| 60 |
+
```
|
| 61 |
+
If you are loading the GGUF model using Python bindings (such as llama-cpp-python):
|
| 62 |
+
|
| 63 |
+
Python
|
| 64 |
+
from llama_cpp import Llama
|
| 65 |
+
|
| 66 |
+
# Initialize the model with the Q4_K_M GGUF file
|
| 67 |
+
llm = Llama(
|
| 68 |
+
model_path="merged_qwen3_vl_4b_q4_k_m.gguf",
|
| 69 |
+
n_ctx=4096, # Context window size
|
| 70 |
+
n_gpu_layers=-1, # Offload all layers to GPU if available
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
+
# Generate a response
|
| 74 |
+
output = llm("Analyze the workflow in this code snippet:", max_tokens=256)
|
| 75 |
+
print(output["choices"][0]["text"])
|
| 76 |
+
⚙️ Conversion & Quantization Details
|
| 77 |
+
The model was exported from PyTorch (torch.float16) to GGUF format utilizing llama.cpp's conversion script, followed by medium-range mixed 4-bit Q4_K_M compression to optimize memory footprints without sacrificing task performance.
|
| 78 |
+
```
|