--- 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](https://huggingface.co/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) ```python 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) ```Python 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.