File size: 2,231 Bytes
b12f259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
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ı).