lthn commited on
Commit
fa7d672
·
verified ·
1 Parent(s): c3f557b

docs: add benchmarks, clean card, cross-link models

Browse files
Files changed (1) hide show
  1. README.md +45 -74
README.md CHANGED
@@ -1,99 +1,70 @@
1
  ---
2
  language:
3
- - en
4
  license: eupl-1.2
5
- library_name: mlx
6
  tags:
7
- - mlx
8
- - safetensors
9
- - gemma4
10
- - lethean
11
- - lem
12
- - text-generation
13
- - conversational
14
- - 4-bit
15
  base_model:
16
- - google/gemma-4-E4B-it
17
  base_model_relation: quantized
18
- pipeline_tag: text-generation
 
 
19
  ---
20
 
21
  # Lemma
22
 
23
- A Gemma 4 E4B fine-tune by [Lethean Network](https://lthn.ai/lemma).
24
-
25
- EUPL-1.2 · Apache 2.0 base · [lthn.ai/lemma](https://lthn.ai/lemma)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  ## Use
28
 
29
- ### MLX
30
-
31
- ```bash
32
- pip install mlx-lm
33
- ```
34
-
35
- ```python
36
- from mlx_lm import load, generate
37
-
38
- model, tokenizer = load("lthn/lemma", revision="4bit")
39
- response = generate(model, tokenizer, prompt="Hello", max_tokens=200)
40
- ```
41
-
42
- ### Ollama
43
-
44
- ```bash
45
- # Coming soon
46
- ```
47
-
48
- ### HF Transformers
49
-
50
- ```python
51
- from transformers import AutoModelForCausalLM, AutoTokenizer
52
-
53
- model = AutoModelForCausalLM.from_pretrained("lthn/lemma", revision="bf16-hf")
54
- tokenizer = AutoTokenizer.from_pretrained("lthn/lemma", revision="bf16-hf")
55
- ```
56
-
57
- ## Branches
58
-
59
- ### MLX
60
-
61
- | Branch | Size |
62
- |--------|------|
63
- | `bf16` | 14G |
64
- | `8bit` | 7.5G |
65
- | `6bit` | 5.8G |
66
- | `5bit` | 4.9G |
67
- | `4bit` | 4.0G |
68
- | `mxfp8` | 7.3G |
69
- | `mxfp4` | 3.8G |
70
- | `nvfp4` | 4.0G |
71
-
72
- ### GGUF
73
 
74
- | Branch | Size |
75
- |--------|------|
76
- | `bf16-gguf` | Coming soon |
77
- | `8bit-gguf` | Coming soon |
78
- | `6bit-gguf` | Coming soon |
79
- | `5bit-gguf` | Coming soon |
80
- | `4bit-gguf` | Coming soon |
81
 
82
- ### HF Transformers
83
 
84
- | Branch | Size |
85
- |--------|------|
86
- | `bf16-hf` | Coming soon |
87
 
88
  ## Base
89
 
90
- [google/gemma-4-E4B-it](https://huggingface.co/google/gemma-4-E4B-it)
91
 
92
  ## More
93
 
94
- - [lthn.ai/lemma](https://lthn.ai/lemma)
95
- - [Lethean Network](https://lthn.ai)
96
- - [GitHub](https://github.com/dappcore)
97
 
98
  ## Licence
99
 
 
1
  ---
2
  language:
3
+ - en
4
  license: eupl-1.2
 
5
  tags:
6
+ - safetensors
7
+ - 4-bit
8
+ - transformers
9
+ - 8-bit
10
+ - gguf
11
+ - gemma4
 
 
12
  base_model:
13
+ - google/gemma-4-E4B-it
14
  base_model_relation: quantized
15
+ pipeline_tag: any-to-any
16
+ datasets:
17
+ - lthn/LEM-research
18
  ---
19
 
20
  # Lemma
21
 
22
+ A [Gemma 4 E4B](https://huggingface.co/google/gemma-4-E4B-it) finetune by [lthn.ai](https://lthn.ai) — EUPL-1.2
23
+
24
+ ## Benchmarks
25
+
26
+ ### MMLU-Pro (4bit, 5-shot CoT, think=on, temp=1.0)
27
+
28
+ | | Lemma |
29
+ | :---- | :----: |
30
+ | Biology | **85.0%** |
31
+ | Computer Science | **80.0%** |
32
+ | Math | **80.0%** |
33
+ | Business | **75.0%** |
34
+ | Physics | **65.0%** |
35
+ | Health | **60.0%** |
36
+ | Other | **60.0%** |
37
+ | Engineering | **55.0%** |
38
+ | Chemistry | **55.0%** |
39
+ | Economics | **50.0%** |
40
+ | Psychology | **45.0%** |
41
+ | Philosophy | **40.0%** |
42
+ | History | 30.0% |
43
+ | Law | 20.0% |
44
+ | **Average** | **57.1%** |
45
+
46
+ [TIGER-Lab/MMLU-Pro](https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro) test split, 20 samples per category.
47
+ Evaluated using [rapid-mlx](https://github.com/LetheanNetwork/Rapid-MLX) + [OpenAI SDK](https://github.com/openai/openai-python) + Google [parse_response()](https://huggingface.co/google/gemma-4-E4B-it).
48
+ Source: [eval.py](https://github.com/LetheanNetwork/LEM/blob/main/eval.py)
49
 
50
  ## Use
51
 
52
+ **Ollama**: `ollama run hf.co/lthn/lemma:Q4_K_M`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
+ **MLX**: [bf16](https://huggingface.co/lthn/lemma/tree/bf16), [8bit](https://huggingface.co/lthn/lemma/tree/8bit), [6bit](https://huggingface.co/lthn/lemma/tree/6bit), [5bit](https://huggingface.co/lthn/lemma/tree/5bit), [4bit](https://huggingface.co/lthn/lemma/tree/4bit), [mxfp8](https://huggingface.co/lthn/lemma/tree/mxfp8), [mxfp4](https://huggingface.co/lthn/lemma/tree/mxfp4), [nvfp4](https://huggingface.co/lthn/lemma/tree/nvfp4)
 
 
 
 
 
 
55
 
56
+ **GGUF**: TBC
57
 
58
+ **HF Transformers**: TBC
 
 
59
 
60
  ## Base
61
 
62
+ [google/gemma-4-E4B-it](https://huggingface.co/google/gemma-4-E4B-it) · [Lemer (E2B)](https://huggingface.co/lthn/lemer) · [Lemmy (26B)](https://huggingface.co/lthn/lemmy) · [Lemrd (31B)](https://huggingface.co/lthn/lemrd)
63
 
64
  ## More
65
 
66
+ - [lthn.ai](https://lthn.ai)
67
+ - [Lethean Network](https://github.com/LetheanNetwork)
 
68
 
69
  ## Licence
70