TheCoderScientist commited on
Commit
803ca85
Β·
verified Β·
1 Parent(s): 2086c46

Model card lengkap (angka dari manifest_qwen38.json)

Browse files
Files changed (1) hide show
  1. README.md +121 -22
README.md CHANGED
@@ -1,22 +1,121 @@
1
- ---
2
- base_model: unsloth/Qwen3.8-27B-unsloth-bnb-4bit
3
- tags:
4
- - text-generation-inference
5
- - transformers
6
- - unsloth
7
- - qwen3_5
8
- - trl
9
- license: apache-2.0
10
- language:
11
- - en
12
- ---
13
-
14
- # Uploaded model
15
-
16
- - **Developed by:** TheCoderScientist
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/Qwen3.8-27B-unsloth-bnb-4bit
19
-
20
- This qwen3_5 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)
21
-
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: unsloth/Qwen3.8-27B-unsloth-bnb-4bit
4
+ language:
5
+ - id
6
+ library_name: peft
7
+ tags:
8
+ - lora
9
+ - qlora
10
+ - unsloth
11
+ - code
12
+ - indonesian
13
+ - qwen3
14
+ pipeline_tag: text-generation
15
+ ---
16
+
17
+ # GarudaCoder-27B πŸ¦… β€” Indonesian Coding Assistant
18
+
19
+ QLoRA adapter (r=8, alpha=8) distilled onto **Qwen3.8-27B** (unsloth 4-bit build) β€” successor of [GarudaCoder-7B-Coder-ID-lora](https://huggingface.co/TheCoderScientist/GarudaCoder-7B-Coder-ID-lora). Fine-tuned on curated high-quality reasoning traces from two teachers (Fable 5 + Hermes gpt-5.6-sol). Focus: explaining the reasoning **before** writing code, honesty about uncertainty (anti-hallucination), and Indonesian developer context. All model output is in Indonesian.
20
+
21
+ ## Trained capabilities
22
+ - Chain-of-thought: root cause β†’ alternatives + trade-offs β†’ solution
23
+ - Self-correction: draft β†’ mental test β†’ find its own bug β†’ fix
24
+ - Multi-turn debugging, asking clarification on ambiguous requests, refusing misguided requests
25
+ - Grounded answers: architecture, debugging workflows, and Indonesian edge cases
26
+
27
+ ## Usage
28
+
29
+ > **IMPORTANT β€” avoid stuck downloads:** the HF Xet backend is known to stall at the `Reconstructing (incomplete total...)` stage ([xet-core#850](https://github.com/huggingface/xet-core/issues/850)). Disable Xet **before any imports**:
30
+
31
+ ```python
32
+ import os
33
+ os.environ["HF_HUB_DISABLE_XET"] = "1" # MUST be the very first cell/line
34
+ ```
35
+
36
+ ### Via Unsloth (recommended)
37
+
38
+ ```python
39
+ from unsloth import FastModel
40
+
41
+ model, tokenizer = FastModel.from_pretrained(
42
+ "TheCoderScientist/GarudaCoder-27B-ID-lora",
43
+ max_seq_length=1024, load_in_4bit=True,
44
+ )
45
+ FastModel.for_inference(model)
46
+
47
+ pesan = [
48
+ {"role": "system", "content": "<copy the system prompt from the section below β€” use verbatim>"},
49
+ {"role": "user", "content": "Kenapa [[0]*3]*3 di Python bikin semua baris ikut berubah?"},
50
+ ]
51
+ inputs = tokenizer.apply_chat_template(pesan, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
52
+ out = model.generate(input_ids=inputs, max_new_tokens=1024, temperature=0.3, do_sample=True)
53
+ print(tokenizer.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
54
+ ```
55
+
56
+ ### Via transformers + PEFT (without Unsloth)
57
+
58
+ ```python
59
+ import torch
60
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
61
+ from peft import PeftModel
62
+
63
+ bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
64
+ bnb_4bit_compute_dtype=torch.float16)
65
+ base = AutoModelForCausalLM.from_pretrained(
66
+ "unsloth/Qwen3.8-27B-unsloth-bnb-4bit", quantization_config=bnb, device_map="auto")
67
+ model = PeftModel.from_pretrained(base, "TheCoderScientist/GarudaCoder-27B-ID-lora")
68
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3.8-27B-unsloth-bnb-4bit")
69
+ ```
70
+
71
+ ## System prompt
72
+
73
+ Use verbatim β€” the model was trained with it; without it, reasoning quality degrades.
74
+
75
+ ```
76
+ Kamu adalah GarudaCoder, asisten coding berbahasa Indonesia yang teliti. Utamakan kebenaran teknis dan kode yang dapat diuji. Jelaskan ringkasan alasan yang dapat diaudit sebelum solusi, nyatakan asumsi dan edge case yang relevan, dan jangan mengarang fakta, API, versi, atau angka. Jika informasi tidak cukup, ajukan pertanyaan klarifikasi. Untuk informasi yang berubah atau bersifat lokal, minta atau gunakan sumber yang dapat diverifikasi. Tolak praktik berbahaya dan tawarkan alternatif yang aman. Jangan tampilkan chain-of-thought privat.
77
+ ```
78
+
79
+ ## Important notes
80
+
81
+ - Sampling config used during eval:
82
+
83
+ ```json
84
+ {
85
+ "max_new_tokens": 1024,
86
+ "do_sample": true,
87
+ "temperature": 0.7,
88
+ "top_p": 0.8,
89
+ "top_k": 20,
90
+ "repetition_penalty": 1.0
91
+ }
92
+ ```
93
+
94
+ - VRAM: 4-bit weights β‰ˆ 20.5 GiB total β†’ needs **2Γ— T4 (16 GB)** or a single 24 GB+ GPU. Does not fit on one T4.
95
+ - This is a **LoRA adapter (PEFT)**, not a full model β€” the Qwen3.8-27B 4-bit base is downloaded automatically on load.
96
+ - On T4 (no bfloat16) this architecture trains in float32 via Unsloth; 4-bit inference works fine.
97
+ - Full provenance (per-file dataset SHA256, seeds, revisions) is committed in this repo at `training/manifest_qwen38.json`.
98
+
99
+ ## Troubleshooting
100
+
101
+ | Symptom | Cause | Fix |
102
+ |---|---|---|
103
+ | Download stuck at `Reconstructing (incomplete total...)` | hf_xet stall bug | `HF_HUB_DISABLE_XET=1` before imports, or `pip uninstall hf-xet` |
104
+ | CUDA out of memory on a single T4 | 27B in 4-bit needs ~2Γ—16 GB | use 2 GPUs or a 24 GB+ GPU |
105
+ | English / shallow answers | system prompt not used | use the system prompt above verbatim |
106
+ | KeyError / adapter won't attach | wrong base model | use unsloth/Qwen3.8-27B-unsloth-bnb-4bit (pinned revision in manifest) |
107
+
108
+ ## Training
109
+
110
+ - QLoRA 4-bit, r=8, alpha=8, max_seq 1024, 1 epoch, 229 examples, Kaggle T4Γ—2
111
+ - SFT with train_on_responses_only (instruction/response masking)
112
+ - Base pinned: unsloth/Qwen3.8-27B-unsloth-bnb-4bit @ 8aa5f05d26b7205477066e1449e0af13f762a299 (upstream Qwen/Qwen3.8-27B @ 1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0)
113
+ - Seed 42 Β· environment: kaggle-t4x2 Β· Python 3.12.13 Β· torch 2.10.0+cu128 Β· CUDA 12.8 Β· VRAM 29.12 GiB
114
+ - Holdout: 80 examples kept out of training entirely
115
+ - Dataset provenance (SHA256 in manifest): distilasi_fable, penguatan_batch8, reasoning_batch9, hermes_debugging, hermes_grounding, hermes_architecture, hermes_edge_indonesia
116
+ - Anti-leakage: holdout/benchmark files gated (FILE_DILARANG_UNTUK_TRAINING)
117
+
118
+ ## Lineage
119
+ - Predecessor: [GarudaCoder-7B-Coder-ID-lora](https://huggingface.co/TheCoderScientist/GarudaCoder-7B-Coder-ID-lora) (Qwen2.5-Coder-7B)
120
+ - Teacher traces: Fable 5 + Hermes gpt-5.6-sol
121
+ - This qwen3_5 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)