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
Update README.md
Browse files
README.md
CHANGED
|
@@ -54,13 +54,14 @@ import torch
|
|
| 54 |
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor, BitsAndBytesConfig
|
| 55 |
```
|
| 56 |
# 1. Configure 4-bit quantization settings
|
|
|
|
| 57 |
bnb_config = BitsAndBytesConfig(
|
| 58 |
load_in_4bit=True,
|
| 59 |
bnb_4bit_compute_dtype=torch.float16,
|
| 60 |
bnb_4bit_quant_type="nf4",
|
| 61 |
bnb_4bit_use_double_quant=True
|
| 62 |
)
|
| 63 |
-
|
| 64 |
# 2. Load the 4-bit weights from your repository subfolder
|
| 65 |
```python
|
| 66 |
repo_id = "kiel2/KielGen-Codex"
|
|
@@ -86,6 +87,7 @@ import torch
|
|
| 86 |
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
|
| 87 |
```
|
| 88 |
# 1. Load the full-precision 16-bit weights from your repository subfolder
|
|
|
|
| 89 |
repo_id = "kiel2/KielGen-Codex"
|
| 90 |
subfolder = "16bit" # Adjust if stored in a custom directory
|
| 91 |
|
|
|
|
| 54 |
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor, BitsAndBytesConfig
|
| 55 |
```
|
| 56 |
# 1. Configure 4-bit quantization settings
|
| 57 |
+
```
|
| 58 |
bnb_config = BitsAndBytesConfig(
|
| 59 |
load_in_4bit=True,
|
| 60 |
bnb_4bit_compute_dtype=torch.float16,
|
| 61 |
bnb_4bit_quant_type="nf4",
|
| 62 |
bnb_4bit_use_double_quant=True
|
| 63 |
)
|
| 64 |
+
```
|
| 65 |
# 2. Load the 4-bit weights from your repository subfolder
|
| 66 |
```python
|
| 67 |
repo_id = "kiel2/KielGen-Codex"
|
|
|
|
| 87 |
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
|
| 88 |
```
|
| 89 |
# 1. Load the full-precision 16-bit weights from your repository subfolder
|
| 90 |
+
```python
|
| 91 |
repo_id = "kiel2/KielGen-Codex"
|
| 92 |
subfolder = "16bit" # Adjust if stored in a custom directory
|
| 93 |
|