| --- |
| license: apache-2.0 |
| base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct |
| language: |
| - tr |
| - en |
| tags: |
| - code |
| - typescript |
| - kotlin |
| - python |
| - qlora |
| pipeline_tag: text-generation |
| --- |
| |
| # Pulsar Coder 1.5B |
|
|
| Pulsar, [NeutronYazılım](https://neutronyazilim.com.tr) tarafından [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) üzerine QLoRA ile fine-tune edilmiş, TypeScript, Kotlin ve Python odaklı bir kod üretim modelidir. |
|
|
| ## Kullanım |
|
|
| ```python |
| from transformers import AutoModelForCausalLM, AutoTokenizer |
| |
| model_id = "NeutronYazilim/pulsar-coder-1.5b" |
| tokenizer = AutoTokenizer.from_pretrained(model_id) |
| model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto") |
| |
| messages = [ |
| {"role": "system", "content": "You are an expert software engineer. Given an instruction, write the requested code."}, |
| {"role": "user", "content": "Write a TypeScript function `debounce` that delays invoking a function until after a wait time."}, |
| ] |
| text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) |
| inputs = tokenizer(text, return_tensors="pt").to(model.device) |
| out = model.generate(**inputs, max_new_tokens=300, repetition_penalty=1.15) |
| print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)) |
| ``` |
|
|
| Quantize edilmiş GGUF sürümü (llama.cpp ile kullanım için) [NeutronYazilim/pulsar-coder-1.5b-GGUF](https://huggingface.co/NeutronYazilim/pulsar-coder-1.5b-GGUF) altında mevcut. |
|
|
| ## Eğitim |
|
|
| - Baz model: Qwen2.5-Coder-1.5B-Instruct |
| - Yöntem: QLoRA (4-bit NF4, r=16, alpha=32), sequence packing, 3 epoch |
| - Veri seti: ~1450 örnek — public repo (claws-mouse-linux), [bigcode/commitpackft](https://huggingface.co/datasets/bigcode/commitpackft) (Python/TypeScript/Kotlin) ve elle yazılmış kimlik verisi |
| - Donanım: RTX 3050 Laptop (4GB VRAM) |
|
|
| ## Sınırlamalar |
|
|
| - 1.5B parametre boyutunda küçük bir model; karmaşık/çok adımlı görevlerde daha büyük modeller kadar güçlü değildir. |
| - Kimlik ile ilgili sorularda bazen gramer açısından pürüzlü cevaplar verebilir. |
| - İngilizce kimlik soruları Türkçe kadar tutarlı değildir. |
|
|
| ## Lisans |
|
|
| Apache License 2.0 (baz modelle aynı). |
|
|