Text Generation
MLX
Safetensors
Hungarian
llama
hungarian
emese
eurollm
instruct
chatml
apple-silicon
quantized
conversational
8-bit precision
Instructions to use emese-tech/folyo-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use emese-tech/folyo-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("emese-tech/folyo-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use emese-tech/folyo-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "emese-tech/folyo-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "emese-tech/folyo-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "emese-tech/folyo-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +63 -0
- chat_template.jinja +4 -0
- config.json +42 -0
- generation_config.json +9 -0
- model-00001-of-00005.safetensors +3 -0
- model-00002-of-00005.safetensors +3 -0
- model-00003-of-00005.safetensors +3 -0
- model-00004-of-00005.safetensors +3 -0
- model-00005-of-00005.safetensors +3 -0
- model.safetensors.index.json +0 -0
- tokenizer.json +3 -0
- tokenizer_config.json +16 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- hu
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: mlx
|
| 6 |
+
base_model: utter-project/EuroLLM-22B
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- hungarian
|
| 10 |
+
- emese
|
| 11 |
+
- eurollm
|
| 12 |
+
- instruct
|
| 13 |
+
- chatml
|
| 14 |
+
- mlx
|
| 15 |
+
- apple-silicon
|
| 16 |
+
- quantized
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# Emese-Folyó (22B) — MLX q8
|
| 20 |
+
|
| 21 |
+
**MLX q8** — the **native training/serving precision** for Folyó (CPT, SFT, and DPO were all trained on
|
| 22 |
+
top of a q8-quantized base). See the `folyo/` repo's README for full architecture, CPT/SFT/DPO training
|
| 23 |
+
details, and benchmarks — this file covers only the q8-specific notes.
|
| 24 |
+
|
| 25 |
+
| | |
|
| 26 |
+
|---|---|
|
| 27 |
+
| **Quantization** | q8, group size 64 |
|
| 28 |
+
| **Size on disk** | ~22 GB (vs. ~42 GB bf16) |
|
| 29 |
+
| **Quality** | This *is* the model's native precision — the `folyo/` bf16 repo is dequantized *from* this, not the other way around. |
|
| 30 |
+
| **Max context length** | 32,768 tokens (EuroLLM-22B's native context) |
|
| 31 |
+
|
| 32 |
+
## Usage
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from mlx_lm import load, generate
|
| 36 |
+
from mlx_lm.sample_utils import make_sampler
|
| 37 |
+
model, tok = load("emese-tech/folyo-mlx")
|
| 38 |
+
p = tok.apply_chat_template([{"role": "user", "content": "Mi Magyarország fővárosa?"}],
|
| 39 |
+
tokenize=False, add_generation_prompt=True)
|
| 40 |
+
print(generate(model, tok, prompt=p, max_tokens=256, sampler=make_sampler(temp=0.2)))
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
**Decode:** temperature `0.2`, no repetition penalty, eos `{2, 4}`, ChatML template.
|
| 44 |
+
|
| 45 |
+
⚠️ **This repo is `mlx_lm`-only** — MLX's q8 quantization packs weights into `uint32` + per-group
|
| 46 |
+
`scales`/`biases` tensors with a `quantization` block in `config.json` that plain `transformers` does not
|
| 47 |
+
understand. Use the `folyo/` (bf16) repo for `transformers`/vLLM/TGI.
|
| 48 |
+
|
| 49 |
+
## Training
|
| 50 |
+
|
| 51 |
+
This is the primary artifact of the CPT+SFT+DPO training chain — see `folyo/README.md` for the full
|
| 52 |
+
q8-native CPT (~6M tokens/6,000 iters, rank64), SFT (`instruct_v18b`, 1 epoch, rank16/scale16/lr5e-6,
|
| 53 |
+
iteration 3,600 selected), and DPO (36 alfa pairs, 120 iters, rank16/scale16/lr2e-6) recipe, plus the
|
| 54 |
+
211/250 Ultimate · 310/376 BlindSpot benchmark results.
|
| 55 |
+
|
| 56 |
+
## Benchmarks
|
| 57 |
+
|
| 58 |
+
**This exact q8 artifact scored 410/500 (82%) on emese-bench v1** (200 questions + 10 chat sessions,
|
| 59 |
+
consolidated Ultimate+BlindSpot) — a close second to Patak (413/500) and far ahead of Csermely
|
| 60 |
+
(211/500). Strongest on safety, reading, translation, and code; weakest on multi-step math and logic
|
| 61 |
+
puzzles. Notably the best of the three models on in-context memory recall and roleplay (both 10/10),
|
| 62 |
+
but it failed to stay in English during the English-chat session, answering in Hungarian throughout.
|
| 63 |
+
See `emese-bench/results/folyo-mlx.md` for the full transcript and category breakdown.
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}<|im_start|>{{ message['role'] }}
|
| 2 |
+
{{ message['content'] }}<|im_end|>
|
| 3 |
+
{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
|
| 4 |
+
{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": [
|
| 10 |
+
2,
|
| 11 |
+
4
|
| 12 |
+
],
|
| 13 |
+
"head_dim": 128,
|
| 14 |
+
"hidden_act": "silu",
|
| 15 |
+
"hidden_size": 6144,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 16384,
|
| 18 |
+
"max_position_embeddings": 32768,
|
| 19 |
+
"mlp_bias": false,
|
| 20 |
+
"model_type": "llama",
|
| 21 |
+
"num_attention_heads": 48,
|
| 22 |
+
"num_hidden_layers": 54,
|
| 23 |
+
"num_key_value_heads": 8,
|
| 24 |
+
"pretraining_tp": 1,
|
| 25 |
+
"quantization": {
|
| 26 |
+
"group_size": 64,
|
| 27 |
+
"bits": 8,
|
| 28 |
+
"mode": "affine"
|
| 29 |
+
},
|
| 30 |
+
"quantization_config": {
|
| 31 |
+
"group_size": 64,
|
| 32 |
+
"bits": 8,
|
| 33 |
+
"mode": "affine"
|
| 34 |
+
},
|
| 35 |
+
"rms_norm_eps": 1e-05,
|
| 36 |
+
"rope_scaling": null,
|
| 37 |
+
"rope_theta": 1000000,
|
| 38 |
+
"tie_word_embeddings": false,
|
| 39 |
+
"transformers_version": "4.56.1",
|
| 40 |
+
"use_cache": true,
|
| 41 |
+
"vocab_size": 128000
|
| 42 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
2,
|
| 6 |
+
4
|
| 7 |
+
],
|
| 8 |
+
"transformers_version": "4.56.1"
|
| 9 |
+
}
|
model-00001-of-00005.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd9f29745e73f232a7c194999c472056021a86377cc644a54e3fd6b01efa279e
|
| 3 |
+
size 5287849928
|
model-00002-of-00005.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03fd4f7a582bfa06174c3861c38950e53658e84e24f052a2b1ca7064a627bf6a
|
| 3 |
+
size 5281244401
|
model-00003-of-00005.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ffa24a6113e1178b34a86791052b972f0449bb6c429fe2a257816c48a373e2d
|
| 3 |
+
size 5281244390
|
model-00004-of-00005.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1811d96bbd40cd7d099c167405784a982936103e38a388361ff9f224c7d34284
|
| 3 |
+
size 5348091098
|
model-00005-of-00005.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:887f3260a5a3cd146108d665ce6f874bf6251fd7c5feab7ca1aaf5751a28c9bf
|
| 3 |
+
size 2854502703
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f236d4eaa17b1b3f4f2aff62301eaa163a4176a74509874bd5514e8fb93ff32a
|
| 3 |
+
size 15783361
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": true,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<s>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "</s>",
|
| 7 |
+
"is_local": true,
|
| 8 |
+
"local_files_only": false,
|
| 9 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 10 |
+
"pad_token": null,
|
| 11 |
+
"sp_model_kwargs": {},
|
| 12 |
+
"spaces_between_special_tokens": false,
|
| 13 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 14 |
+
"unk_token": "<unk>",
|
| 15 |
+
"use_default_system_prompt": false
|
| 16 |
+
}
|