Downloads · 30 days
36
19% of all-time downloads
hasankursun/HK-362M
HK-362M is a text generation model from hasankursun. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
HK-362M is a highly efficient 362M parameter transformer model optimized for educational content generation and creative writing. The model achieves breakthrough performance with 5.47 validation perplexity, representi…
Downloads · 30 days
36
19% of all-time downloads
All-time downloads
193
Public
Parameters
362M
1.5 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors1.4 GB · 99%
From the Hugging Face model README
HK-362M is a highly efficient 362M parameter transformer model optimized for educational content generation and creative writing. The model achieves breakthrough performance with 5.47 validation perplexity, representing world-record efficiency in the 300M parameter class.
Architecture: RoPE Transformer
Parameters: 362,318,784
Hidden Size: 768
Number of Layers: 24
Number of Attention Heads: 12
Head Dimension: 64
Feed Forward Dimension: 3072 (4x hidden size)
Vocabulary Size: 250,000
Max Sequence Length: 1024
Position Encoding: Rotary Position Embedding (RoPE)
Normalization: RMS Normalization
Activation: SwiGLU
Dropout: 0.0
Weight Tying: Yes (embedding and lm_head)
| Metric | Value | Comparison |
|---|---|---|
| Validation Perplexity | 5.47 | 4-5x better than GPT-2 Medium |
| Parameters | 362M | Similar to GPT-2 Medium (355M) |
| Efficiency Ratio | 0.0166 PPL/M params | High efficiency |
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("hasankursun/hk-362m-base")
model = AutoModelForCausalLM.from_pretrained("hasankursun/hk-362m-base")
# Generate text
inputs = tokenizer("Once upon a time, in a bustling city where dreams came alive,", return_tensors="pt")
outputs = model.generate(
**inputs,
max_length=200,
temperature=0.8,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
Recommended Settings:
Temperature: 0.7-0.9
Top-p: 0.85-0.95
Top-k: 40-60
Repetition Penalty: 1.1
Max Length: 200-600 tokens
Prompt: "Once upon a time, in a bustling city where dreams came alive,"
Generation: "Once upon a time, in a bustling city where dreams came alive, there was an art gallery named 'Pink & Blue.' This quaint little store offered a diverse range of artwork from various artists and eras. Among them were two young friends - Mia, who loved exploring new styles and techniques, and Ben, passionate about capturing nature's beauty on canvas..."
Prompt: "The scientist looked at the data in disbelief and whispered,"
Generation: "The scientist looked at the data in disbelief and whispered, 'This shows how certain conditions can lead to undesirable outcomes.' She then asked, 'But why does that matter if something causes you to get sick?' Mr. Wise Owl explained, 'You see, when we take care of our bodies, especially those living with infectious diseases...'"
This model serves as the foundation for a planned scaling strategy:
If you use this model in your research, please cite:
@misc{hk362m2025,
title={HK-362M: Efficient Domain-Specialized Language Model},
author={Hasan KURŞUN},
year={2025},
note={Achieving 5.47 PPL with 362M parameters through strategic domain specialization},
url={[https://huggingface.co/hasankursun/hk-362m-base](https://huggingface.co/hasankursun/hk-362m-base)}
}