Views
No views yet
| Specification | Value |
|---|---|
| Architecture | GPT-OSS Mini (MoE) |
| Number of Layers | 6 |
| Hidden Size | 768 |
| Attention Heads | 8 |
| Intermediate Size | 3072 (SwiGLU) |
| Mixture of Experts | 4 |
| Top-K Active Experts | 2 |
| Vocabulary Size | 50,000 |
| Maximum Sequence Length | 512 |
| Normalization | RMSNorm |
| Activation Function | SwiGLU |
| Tokenizer | ZombitX64/Hanuman |
pip install transformers accelerate sentencepiece1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("JonusNattapong/gptoss-mini-thaichat", trust_remote_code=True)
4model = AutoModelForCausalLM.from_pretrained("JonusNattapong/gptoss-mini-thaichat", trust_remote_code=True)
5
6inputs = tokenizer("สวัสดีครับ", return_tensors="pt").to(model.device)
7
8outputs = model.generate(
9 **inputs,
10 max_length=50,
11 do_sample=True,
12 top_p=0.9,
13 temperature=0.7
14)
15
16print(tokenizer.decode(outputs[0], skip_special_tokens=True))Input: สวัสดีครับ
Output: สวัสดีครับ ยินดีที่ได้สนทนาด้วยครับ ต้องการให้ช่วยเรื่องใดเพิ่มเติมหรือไม่