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
Download README.md from kiel2/kiel-2-codex: direct link, hf CLI and curl.
- Browser
- Download file 2.4 kB
-
https://huggingface.co/kiel2/kiel-2-codex/resolve/main/README.md
- Command line
-
hf download hf://kiel2/kiel-2-codex/README.md
-
curl -L -o README.md https://huggingface.co/kiel2/kiel-2-codex/resolve/main/README.md
license: apache-2.0
language:
- en
base_model:
- Qwen/Qwen3-VL-4B-Instruct
tags:
- vision
- multimodal
- code-generation
- qwen-vl
- peft
- unsloth
- kiel2
Kiel-2-Codex
Kiel-2-Codex is a specialized multimodal vision-language model fine-tuned on top of Qwen/Qwen3-VL-4B-Instruct. It bridges advanced visual perception with deep code generation, layout translation, and technical instruction-following.
To accommodate different hardware setups, this repository provides both quantized 4-bit weights and full 16-bit weights as separate directories, alongside the raw training adapter files.
Repository Structure
4bit/— Pre-quantized 4-bit weights (ideal for lower VRAM setups like a Tesla T4 or consumer GPUs).16bit/— Full-precision 16-bit weights (ideal for high-VRAM training/inference).- Root files — Contains the raw LoRA adapter weights (
adapter_model.safetensors), tokenizer configuration, and chat template.
Quick Start (Python Inference)
You can easily load either version directly using Hugging Face transformers by specifying the appropriate subfolder:
Option A: Load the 4-bit Version (Recommended for standard GPUs)
import torch
from transformers import AutoModelForVision2Seq, AutoProcessor
model_id = "kiel2/kiel-2-codex"
print("Loading Kiel-2-Codex (4-bit)...")
model = AutoModelForVision2Seq.from_pretrained(
model_id,
subfolder="4bit",
torch_dtype=torch.float16,
device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)
Option B: Load the 16-bit Version (Full Precision)
import torch
from transformers import AutoModelForVision2Seq, AutoProcessor
model_id = "kiel2/kiel-2-codex"
print("Loading Kiel-2-Codex (16-bit)...")
model = AutoModelForVision2Seq.from_pretrained(
model_id,
subfolder="16bit",
torch_dtype=torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16,
device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)
Training Details
Base Model: Qwen/Qwen3-VL-4B-Instruct
Fine-Tuning Framework: Unsloth / Hugging Face TRL & PEFT
Task Focus: Multimodal code generation and structural layout analysis.
License
This model inherits the licensing structure of its base architecture under the Apache 2.0 License.