初始化项目,由ModelHub XC社区提供模型
Model: SL-AI/GRaPE-Nano Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
68
README.md
Normal file
68
README.md
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
license: apache-2.0
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
library_name: transformers
|
||||||
|
datasets:
|
||||||
|
- SL-AI/GRaPE-Base-Mix
|
||||||
|
base_model:
|
||||||
|
- LiquidAI/LFM2-700M
|
||||||
|
---
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
_The **G**eneral **R**easoning **A**gent (for) **P**roject **E**xploration_
|
||||||
|
|
||||||
|
# The GRaPE Family
|
||||||
|
| Attribute | Size | Modalities | Domain |
|
||||||
|
| :--- | :--- | :--- | :--- |
|
||||||
|
| **GRaPE Flash** | 7B A1B | Text in, Text out | High-Speed Applications |
|
||||||
|
| **GRaPE Mini** | 3B | Text + Image + Video in, Text out | On-Device Deployment |
|
||||||
|
| **GRaPE Nano** | 700M | Text in, Text out | Extreme Edge Deployment |
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
# Capabilities
|
||||||
|
|
||||||
|
The GRaPE Family was trained on about **14 billion** tokens of data after pre-training. About half was code related tasks, with the rest being heavy on STEAM. Ensuring the model has a sound logical basis.
|
||||||
|
> *GRaPE Nano does not have thinking capabilities, primarily in favor of instant responses.*
|
||||||
|
***
|
||||||
|
|
||||||
|
GRaPE Flash and Nano are monomodal models, only accepting text. GRaPE Mini being trained most recently supports image and video inputs.
|
||||||
|
|
||||||
|
# How to Run
|
||||||
|
|
||||||
|
I recommend using **LM Studio** for running GRaPE Models, and have generally found these sampling parameters to work best:
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| :--- | :--- |
|
||||||
|
| **Temperature** | 0.6 |
|
||||||
|
| **Top K Sampling** | 40 |
|
||||||
|
| **Repeat Penalty** | 1 |
|
||||||
|
| **Top P Sampling** | 0.85 |
|
||||||
|
| **Min P Sampling** | 0.05 |
|
||||||
|
|
||||||
|
# GRaPE Nano as a Model
|
||||||
|
|
||||||
|
Recently there has been a push for smaller and smaller models. GRaPE Nano explores this by performing **full finetuning** on a 700M model, adapting it to the GRaPE style of outputs. Like GRaPE Flash, GRaPE Nano **does not** have thinking capabilities. Edge devices are often slow, and it would be worse to make it even slower.
|
||||||
|
|
||||||
|
# Architecture
|
||||||
|
|
||||||
|
* GRaPE Flash: Built on the `OlMoE` Architecture, allowing for incredibly fast speeds where it matters. Allows for retaining factual information, but lacks in logical tasks.
|
||||||
|
|
||||||
|
* GRaPE Mini: Built on the `Qwen3 VL` Architecture, allowing for edge case deployments, where logic cannot be sacrificed.
|
||||||
|
|
||||||
|
* GRaPE Nano: Built on the `LFM 2` Architecture, allowing for the fastest speed, and the most knowledge in the tiniest package.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
|
||||||
|
The GRaPE Family started all the way back in August of 2025, meaning these models are severely out of date on architecture, and training data.
|
||||||
|
|
||||||
|
GRaPE 2 will come sooner than the GRaPE 1 family had, and will show multiple improvements.
|
||||||
|
|
||||||
|
There are no benchmarks for GRaPE 1 Models due to the costly nature of running them, as well as prioritization of newer models.
|
||||||
|
|
||||||
|
Updates for GRaPE 2 models will be posted here on Huggingface, as well as [Skinnertopia](https://www.skinnertopia.com/)
|
||||||
37
chat_template.jinja
Normal file
37
chat_template.jinja
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{{- bos_token -}}
|
||||||
|
{%- set system_prompt = "" -%}
|
||||||
|
{%- set ns = namespace(system_prompt="") -%}
|
||||||
|
{%- if messages[0]["role"] == "system" -%}
|
||||||
|
{%- set ns.system_prompt = messages[0]["content"] -%}
|
||||||
|
{%- set messages = messages[1:] -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if tools -%}
|
||||||
|
{%- set ns.system_prompt = ns.system_prompt + ("\n" if ns.system_prompt else "") + "List of tools: <|tool_list_start|>[" -%}
|
||||||
|
{%- for tool in tools -%}
|
||||||
|
{%- if tool is not string -%}
|
||||||
|
{%- set tool = tool | tojson -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- set ns.system_prompt = ns.system_prompt + tool -%}
|
||||||
|
{%- if not loop.last -%}
|
||||||
|
{%- set ns.system_prompt = ns.system_prompt + ", " -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- set ns.system_prompt = ns.system_prompt + "]<|tool_list_end|>" -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if ns.system_prompt -%}
|
||||||
|
{{- "<|im_start|>system\n" + ns.system_prompt + "<|im_end|>\n" -}}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- for message in messages -%}
|
||||||
|
{{- "<|im_start|>" + message["role"] + "\n" -}}
|
||||||
|
{%- set content = message["content"] -%}
|
||||||
|
{%- if content is not string -%}
|
||||||
|
{%- set content = content | tojson -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if message["role"] == "tool" -%}
|
||||||
|
{%- set content = "<|tool_response_start|>" + content + "<|tool_response_end|>" -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{{- content + "<|im_end|>\n" -}}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- if add_generation_prompt -%}
|
||||||
|
{{- "<|im_start|>assistant\n" -}}
|
||||||
|
{%- endif -%}
|
||||||
58
config.json
Normal file
58
config.json
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"Lfm2ForCausalLM"
|
||||||
|
],
|
||||||
|
"block_auto_adjust_ff_dim": true,
|
||||||
|
"block_dim": 1536,
|
||||||
|
"block_ff_dim": 10240,
|
||||||
|
"block_ffn_dim_multiplier": 1.0,
|
||||||
|
"block_mlp_init_scale": 1.0,
|
||||||
|
"block_multiple_of": 256,
|
||||||
|
"block_norm_eps": 1e-05,
|
||||||
|
"block_out_init_scale": 1.0,
|
||||||
|
"block_use_swiglu": true,
|
||||||
|
"block_use_xavier_init": true,
|
||||||
|
"bos_token_id": 1,
|
||||||
|
"conv_L_cache": 3,
|
||||||
|
"conv_bias": false,
|
||||||
|
"conv_dim": 1536,
|
||||||
|
"conv_dim_out": 1536,
|
||||||
|
"conv_use_xavier_init": true,
|
||||||
|
"dtype": "bfloat16",
|
||||||
|
"eos_token_id": 7,
|
||||||
|
"hidden_size": 1536,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 10240,
|
||||||
|
"layer_types": [
|
||||||
|
"conv",
|
||||||
|
"conv",
|
||||||
|
"full_attention",
|
||||||
|
"conv",
|
||||||
|
"conv",
|
||||||
|
"full_attention",
|
||||||
|
"conv",
|
||||||
|
"conv",
|
||||||
|
"full_attention",
|
||||||
|
"conv",
|
||||||
|
"full_attention",
|
||||||
|
"conv",
|
||||||
|
"full_attention",
|
||||||
|
"conv",
|
||||||
|
"full_attention",
|
||||||
|
"conv"
|
||||||
|
],
|
||||||
|
"max_position_embeddings": 128000,
|
||||||
|
"model_type": "lfm2",
|
||||||
|
"norm_eps": 1e-05,
|
||||||
|
"num_attention_heads": 24,
|
||||||
|
"num_heads": 24,
|
||||||
|
"num_hidden_layers": 16,
|
||||||
|
"num_key_value_heads": 8,
|
||||||
|
"pad_token_id": 0,
|
||||||
|
"rope_theta": 1000000.0,
|
||||||
|
"transformers_version": "4.57.3",
|
||||||
|
"unsloth_version": "2025.12.7",
|
||||||
|
"use_cache": true,
|
||||||
|
"use_pos_enc": true,
|
||||||
|
"vocab_size": 65536
|
||||||
|
}
|
||||||
10
generation_config.json
Normal file
10
generation_config.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"_from_model_config": true,
|
||||||
|
"bos_token_id": 1,
|
||||||
|
"eos_token_id": [
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"max_length": 128000,
|
||||||
|
"pad_token_id": 0,
|
||||||
|
"transformers_version": "4.57.3"
|
||||||
|
}
|
||||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9fcea5ee20b098b984f326898fb37c2b14d203ed0ce97c6a4244259b63174784
|
||||||
|
size 1484995328
|
||||||
23
special_tokens_map.json
Normal file
23
special_tokens_map.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"bos_token": {
|
||||||
|
"content": "<|startoftext|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"eos_token": {
|
||||||
|
"content": "<|im_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"pad_token": {
|
||||||
|
"content": "<|pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
}
|
||||||
|
}
|
||||||
323812
tokenizer.json
Normal file
323812
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
4079
tokenizer_config.json
Normal file
4079
tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user