95 lines
2.1 KiB
Markdown
95 lines
2.1 KiB
Markdown
|
|
---
|
||
|
|
license: gemma
|
||
|
|
language:
|
||
|
|
- en
|
||
|
|
- zh
|
||
|
|
base_model: twinkle-ai/gemma-3-4B-T1-it
|
||
|
|
library_name: transformers
|
||
|
|
tags:
|
||
|
|
- Taiwan
|
||
|
|
- R.O.C
|
||
|
|
- zhtw
|
||
|
|
- SLM
|
||
|
|
- Gemma-3
|
||
|
|
- gemma3
|
||
|
|
- mlx
|
||
|
|
- mlx-my-repo
|
||
|
|
datasets:
|
||
|
|
- lianghsun/tw-reasoning-instruct
|
||
|
|
- lianghsun/tw-contract-review-chat
|
||
|
|
- minyichen/tw-instruct-R1-200k
|
||
|
|
- minyichen/tw_mm_R1
|
||
|
|
- minyichen/LongPaper_multitask_zh_tw_R1
|
||
|
|
- nvidia/Nemotron-Instruction-Following-Chat-v1
|
||
|
|
metrics:
|
||
|
|
- accuracy
|
||
|
|
model-index:
|
||
|
|
- name: gemma-3-4B-T1-it
|
||
|
|
results:
|
||
|
|
- task:
|
||
|
|
type: question-answering
|
||
|
|
name: Single Choice Question
|
||
|
|
dataset:
|
||
|
|
name: tmmlu+
|
||
|
|
type: ikala/tmmluplus
|
||
|
|
config: all
|
||
|
|
split: test
|
||
|
|
revision: c0e8ae955997300d5dbf0e382bf0ba5115f85e8c
|
||
|
|
metrics:
|
||
|
|
- type: accuracy
|
||
|
|
value: 47.44
|
||
|
|
name: single choice
|
||
|
|
- task:
|
||
|
|
type: question-answering
|
||
|
|
name: Single Choice Question
|
||
|
|
dataset:
|
||
|
|
name: mmlu
|
||
|
|
type: cais/mmlu
|
||
|
|
config: all
|
||
|
|
split: test
|
||
|
|
revision: c30699e
|
||
|
|
metrics:
|
||
|
|
- type: accuracy
|
||
|
|
value: 59.13
|
||
|
|
name: single choice
|
||
|
|
- task:
|
||
|
|
type: question-answering
|
||
|
|
name: Single Choice Question
|
||
|
|
dataset:
|
||
|
|
name: tw-legal-benchmark-v1
|
||
|
|
type: lianghsun/tw-legal-benchmark-v1
|
||
|
|
config: all
|
||
|
|
split: test
|
||
|
|
revision: 66c3a5f
|
||
|
|
metrics:
|
||
|
|
- type: accuracy
|
||
|
|
value: 44.18
|
||
|
|
name: single choice
|
||
|
|
---
|
||
|
|
|
||
|
|
# thliang01/gemma-3-4B-T1-it-mlx-fp16
|
||
|
|
|
||
|
|
The Model [thliang01/gemma-3-4B-T1-it-mlx-fp16](https://huggingface.co/thliang01/gemma-3-4B-T1-it-mlx-fp16) was converted to MLX format from [twinkle-ai/gemma-3-4B-T1-it](https://huggingface.co/twinkle-ai/gemma-3-4B-T1-it) using mlx-lm version **0.29.1**.
|
||
|
|
|
||
|
|
## Use with mlx
|
||
|
|
|
||
|
|
```bash
|
||
|
|
pip install mlx-lm
|
||
|
|
```
|
||
|
|
|
||
|
|
```python
|
||
|
|
from mlx_lm import load, generate
|
||
|
|
|
||
|
|
model, tokenizer = load("thliang01/gemma-3-4B-T1-it-mlx-fp16")
|
||
|
|
|
||
|
|
prompt="hello"
|
||
|
|
|
||
|
|
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
||
|
|
messages = [{"role": "user", "content": prompt}]
|
||
|
|
prompt = tokenizer.apply_chat_template(
|
||
|
|
messages, tokenize=False, add_generation_prompt=True
|
||
|
|
)
|
||
|
|
|
||
|
|
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
||
|
|
```
|