Add files using upload-large-folder tool
Browse files- README.md +117 -0
- config.json +38 -0
- model.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer_config.json +85 -0
README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: mlx
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
datasets:
|
| 6 |
+
- yulan-team/YuLan-Mini-Datasets
|
| 7 |
+
- HuggingFaceFW/fineweb-edu
|
| 8 |
+
- bigcode/the-stack-v2
|
| 9 |
+
- mlfoundations/dclm-baseline-1.0
|
| 10 |
+
- math-ai/AutoMathText
|
| 11 |
+
- gair-prox/open-web-math-pro
|
| 12 |
+
- RUC-AIBOX/long_form_thought_data_5k
|
| 13 |
+
- internlm/Lean-Workbook
|
| 14 |
+
- internlm/Lean-Github
|
| 15 |
+
- deepseek-ai/DeepSeek-Prover-V1
|
| 16 |
+
- ScalableMath/Lean-STaR-base
|
| 17 |
+
- ScalableMath/Lean-STaR-plus
|
| 18 |
+
- ScalableMath/Lean-CoT-base
|
| 19 |
+
- ScalableMath/Lean-CoT-plus
|
| 20 |
+
- opencsg/chinese-fineweb-edu
|
| 21 |
+
- liwu/MNBVC
|
| 22 |
+
- vikp/textbook_quality_programming
|
| 23 |
+
- HuggingFaceTB/smollm-corpus
|
| 24 |
+
- OpenCoder-LLM/opc-annealing-corpus
|
| 25 |
+
- OpenCoder-LLM/opc-sft-stage1
|
| 26 |
+
- OpenCoder-LLM/opc-sft-stage2
|
| 27 |
+
- XinyaoHu/AMPS_mathematica
|
| 28 |
+
- deepmind/math_dataset
|
| 29 |
+
- mrfakename/basic-math-10m
|
| 30 |
+
- microsoft/orca-math-word-problems-200k
|
| 31 |
+
- AI-MO/NuminaMath-CoT
|
| 32 |
+
- HuggingFaceTB/cosmopedia
|
| 33 |
+
- MU-NLPC/Calc-ape210k
|
| 34 |
+
- manu/project_gutenberg
|
| 35 |
+
- storytracer/LoC-PD-Books
|
| 36 |
+
- allenai/dolma
|
| 37 |
+
language:
|
| 38 |
+
- en
|
| 39 |
+
- zh
|
| 40 |
+
tags:
|
| 41 |
+
- code
|
| 42 |
+
- math
|
| 43 |
+
- mlx
|
| 44 |
+
arxiv: 2412.17743
|
| 45 |
+
base_model: yulan-team/YuLan-Mini
|
| 46 |
+
model-index:
|
| 47 |
+
- name: YuLan-Mini
|
| 48 |
+
results:
|
| 49 |
+
- task:
|
| 50 |
+
type: text-generation
|
| 51 |
+
dataset:
|
| 52 |
+
name: HumanEval
|
| 53 |
+
type: openai_humaneval
|
| 54 |
+
metrics:
|
| 55 |
+
- type: pass@1
|
| 56 |
+
value: 0.64
|
| 57 |
+
name: pass@1
|
| 58 |
+
verified: false
|
| 59 |
+
- task:
|
| 60 |
+
type: text-generation
|
| 61 |
+
dataset:
|
| 62 |
+
name: MBPP
|
| 63 |
+
type: mbpp
|
| 64 |
+
metrics:
|
| 65 |
+
- type: pass@1
|
| 66 |
+
value: 0.659
|
| 67 |
+
name: pass@1
|
| 68 |
+
verified: false
|
| 69 |
+
- task:
|
| 70 |
+
type: text-generation
|
| 71 |
+
dataset:
|
| 72 |
+
name: MATH-500
|
| 73 |
+
type: math-500
|
| 74 |
+
metrics:
|
| 75 |
+
- type: maj@1
|
| 76 |
+
value: 0.378
|
| 77 |
+
name: maj@1
|
| 78 |
+
verified: false
|
| 79 |
+
- task:
|
| 80 |
+
type: text-generation
|
| 81 |
+
dataset:
|
| 82 |
+
name: GSM8K
|
| 83 |
+
type: gsm8k
|
| 84 |
+
metrics:
|
| 85 |
+
- type: maj@1
|
| 86 |
+
value: 0.684
|
| 87 |
+
name: maj@1
|
| 88 |
+
verified: false
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
# IvanHU/YuLan-Mini-4bit
|
| 92 |
+
|
| 93 |
+
This model [IvanHU/YuLan-Mini-4bit](https://huggingface.co/IvanHU/YuLan-Mini-4bit) was
|
| 94 |
+
converted to MLX format from [yulan-team/YuLan-Mini](https://huggingface.co/yulan-team/YuLan-Mini)
|
| 95 |
+
using mlx-lm version **0.22.2**.
|
| 96 |
+
|
| 97 |
+
## Use with mlx
|
| 98 |
+
|
| 99 |
+
```bash
|
| 100 |
+
pip install mlx-lm
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
```python
|
| 104 |
+
from mlx_lm import load, generate
|
| 105 |
+
|
| 106 |
+
model, tokenizer = load("IvanHU/YuLan-Mini-4bit")
|
| 107 |
+
|
| 108 |
+
prompt = "hello"
|
| 109 |
+
|
| 110 |
+
if tokenizer.chat_template is not None:
|
| 111 |
+
messages = [{"role": "user", "content": prompt}]
|
| 112 |
+
prompt = tokenizer.apply_chat_template(
|
| 113 |
+
messages, add_generation_prompt=True
|
| 114 |
+
)
|
| 115 |
+
|
| 116 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 117 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": true,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"head_dim": 64,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 1920,
|
| 12 |
+
"initializer_range": 5e-05,
|
| 13 |
+
"intermediate_size": 4800,
|
| 14 |
+
"max_position_embeddings": 28723,
|
| 15 |
+
"mlp_bias": false,
|
| 16 |
+
"model_type": "llama",
|
| 17 |
+
"num_attention_heads": 30,
|
| 18 |
+
"num_hidden_layers": 56,
|
| 19 |
+
"num_key_value_heads": 6,
|
| 20 |
+
"pad_token_id": 102,
|
| 21 |
+
"pretraining_tp": 1,
|
| 22 |
+
"quantization": {
|
| 23 |
+
"group_size": 64,
|
| 24 |
+
"bits": 4
|
| 25 |
+
},
|
| 26 |
+
"quantization_config": {
|
| 27 |
+
"group_size": 64,
|
| 28 |
+
"bits": 4
|
| 29 |
+
},
|
| 30 |
+
"rms_norm_eps": 1e-06,
|
| 31 |
+
"rope_scaling": null,
|
| 32 |
+
"rope_theta": 490000.0,
|
| 33 |
+
"tie_word_embeddings": false,
|
| 34 |
+
"torch_dtype": "bfloat16",
|
| 35 |
+
"transformers_version": "4.47.1",
|
| 36 |
+
"use_cache": true,
|
| 37 |
+
"vocab_size": 99000
|
| 38 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0bf202235f04f9dc4f474f026d73f3e47c5d597023ca624f481f4252c9715ee
|
| 3 |
+
size 1364562335
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<pad>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<unk>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": null,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"0": {
|
| 7 |
+
"content": "<unk>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"1": {
|
| 15 |
+
"content": "<s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
"2": {
|
| 23 |
+
"content": "</s>",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"rstrip": false,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": true
|
| 29 |
+
},
|
| 30 |
+
"102": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"103": {
|
| 39 |
+
"content": "<reasoning_step>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": true
|
| 45 |
+
},
|
| 46 |
+
"104": {
|
| 47 |
+
"content": "<|start_header_id|>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"rstrip": false,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": true
|
| 53 |
+
},
|
| 54 |
+
"105": {
|
| 55 |
+
"content": "<|end_header_id|>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"rstrip": false,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": true
|
| 61 |
+
},
|
| 62 |
+
"106": {
|
| 63 |
+
"content": "<|eot_id|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"rstrip": false,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": true
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
"bos_token": "<s>",
|
| 72 |
+
"chat_template": "{% if messages[0]['role'] == 'system' %}\n {% set offset = 1 %}\n{% else %}\n {% set offset = 0 %}\n{% endif %}\n\n{{ bos_token }}\n{% for message in messages %}\n {% if (message['role'] == 'user') != (loop.index0 % 2 == offset) %}\n {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}\n {% endif %}\n\n {{ '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n' + message['content'] | trim + '<|eot_id|>' }}\n{% endfor %}\n\n{% if add_generation_prompt %}\n {{ '<|start_header_id|>' + 'assistant' + '<|end_header_id|>\n\n' }}\n{% endif %}",
|
| 73 |
+
"clean_up_tokenization_spaces": false,
|
| 74 |
+
"eos_token": "</s>",
|
| 75 |
+
"extra_special_tokens": {},
|
| 76 |
+
"legacy": true,
|
| 77 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 78 |
+
"pad_token": "<pad>",
|
| 79 |
+
"padding_side": "right",
|
| 80 |
+
"sp_model_kwargs": {},
|
| 81 |
+
"spaces_between_special_tokens": false,
|
| 82 |
+
"tokenizer_class": "LlamaTokenizerFast",
|
| 83 |
+
"unk_token": "<unk>",
|
| 84 |
+
"use_default_system_prompt": false
|
| 85 |
+
}
|