gyopak commited on
Commit
2ecc452
·
verified ·
1 Parent(s): cc81ec8
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - hu
4
+ license: mit
5
+ tags:
6
+ - hungarian
7
+ - causal-lm
8
+ - llama
9
+ - mlx
10
+ - apple-silicon
11
+ - sentencepiece
12
+ library_name: transformers
13
+ pipeline_tag: text-generation
14
+ model-index:
15
+ - name: csermely
16
+ results: []
17
+ ---
18
+
19
+ # Csermely 0.1B
20
+
21
+ **The smallest coherent Hungarian language model.** Part of the [Emese](https://emese.tech) model family.
22
+
23
+ Csermely is a 138M parameter decoder-only transformer trained exclusively on high-quality Hungarian text. It runs on edge devices and excels in summarization, grammar checking, and tone detection.
24
+
25
+ ## Model Details
26
+
27
+ | | |
28
+ |---|---|
29
+ | **Parameters** | 137.8M |
30
+ | **Context length** | 8,192 tokens (YaRN RoPE) |
31
+ | **Architecture** | LLaMA-style (decoder-only transformer) |
32
+ | **Training context** | 2,048 tokens |
33
+ | **Training precision** | bfloat16 (MLX) |
34
+ | **Published weights** | float16 |
35
+ | **Vocabulary** | 32,000 (SentencePiece Unigram, Hungarian) |
36
+ | **Training data** | ~1B tokens of Hungarian text |
37
+ | **License** | MIT |
38
+
39
+ ## Architecture
40
+
41
+ - 16 transformer layers
42
+ - 768 hidden dimension
43
+ - 12 attention heads
44
+ - 2048 FFN intermediate size
45
+ - RMSNorm pre-layer normalization
46
+ - Rotary positional embeddings (RoPE) with YaRN extension
47
+ - SwiGLU feed-forward activation
48
+ - Tied input/output embeddings
49
+
50
+ ## Tokenizer
51
+
52
+ Custom 32K vocabulary SentencePiece Unigram tokenizer trained on high-quality Hungarian corpora. ~30% more token-efficient than multilingual tokenizers for Hungarian text.
53
+
54
+ Available separately: [emese-tech/emese-tokenizer-32k](https://huggingface.co/emese-tech/emese-tokenizer-32k)
55
+
56
+ ## Usage
57
+
58
+ ```python
59
+ from transformers import AutoTokenizer, AutoModelForCausalLM
60
+
61
+ tokenizer = AutoTokenizer.from_pretrained("emese-tech/csermely")
62
+ model = AutoModelForCausalLM.from_pretrained("emese-tech/csermely")
63
+
64
+ input_text = "A magyar nyelv"
65
+ inputs = tokenizer(input_text, return_tensors="pt")
66
+ outputs = model.generate(**inputs, max_new_tokens=100)
67
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
68
+ ```
69
+
70
+ The default generation config uses `temperature=0.7`, `top_p=0.9`, and `repetition_penalty=1.2` to reduce repetitive output.
71
+
72
+ ## Citation
73
+
74
+ ```bibtex
75
+ @misc{emese-csermely-2026,
76
+ title={Csermely: A Tiny Hungarian Language Model},
77
+ author={Emese Tech},
78
+ year={2026},
79
+ url={https://huggingface.co/emese-tech/csermely}
80
+ }
81
+ ```
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": ["LlamaForCausalLM"],
3
+ "model_type": "llama",
4
+ "model_version": "0.1",
5
+ "vocab_size": 32000,
6
+ "hidden_size": 768,
7
+ "intermediate_size": 2048,
8
+ "num_hidden_layers": 16,
9
+ "num_attention_heads": 12,
10
+ "num_key_value_heads": 12,
11
+ "hidden_act": "silu",
12
+ "max_position_embeddings": 8192,
13
+ "rope_theta": 10000.0,
14
+ "rope_scaling": {
15
+ "type": "yarn",
16
+ "factor": 4.0,
17
+ "original_max_position_embeddings": 2048
18
+ },
19
+ "rms_norm_eps": 1e-5,
20
+ "tie_word_embeddings": true,
21
+ "torch_dtype": "float16",
22
+ "bos_token_id": 2,
23
+ "eos_token_id": 3,
24
+ "pad_token_id": 1,
25
+ "transformers_version": "4.45.0"
26
+ }
generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "max_new_tokens": 256,
3
+ "do_sample": true,
4
+ "temperature": 0.7,
5
+ "top_p": 0.9,
6
+ "repetition_penalty": 1.2,
7
+ "bos_token_id": 2,
8
+ "eos_token_id": 3,
9
+ "pad_token_id": 1,
10
+ "transformers_version": "4.45.0"
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b71a2b93e76e0e24f49dee8e66ff08ced606a220c7e7676d2824d81d27bd4552
3
+ size 324863416
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<bos>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<eos>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "pad_token": {
24
+ "content": "<pad>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:244bb6facd57b3890990261b9932ab50d79630d5b35058c902a5c96c32fa2950
3
+ size 845117
tokenizer_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<bos>",
3
+ "eos_token": "<eos>",
4
+ "unk_token": "<unk>",
5
+ "pad_token": "<pad>",
6
+ "sp_model_kwargs": {},
7
+ "add_bos_token": true,
8
+ "add_eos_token": false,
9
+ "model_max_length": 8192,
10
+ "tokenizer_class": "LlamaTokenizer",
11
+ "clean_up_tokenization_spaces": false
12
+ }