初始化项目,由ModelHub XC社区提供模型
Model: Abhinav-Anand/MiniMerge-0.1B Source: Original Platform
This commit is contained in:
commit
3095b26d93
10 files changed
+294212
No files matched your search
@@ -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
|
||||
@@ -0,0 +1,78 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
base_model:
|
||||
- HuggingFaceTB/SmolLM-135M
|
||||
- HuggingFaceTB/SmolLM-135M-Instruct
|
||||
tags:
|
||||
- merge
|
||||
- slerp
|
||||
- smollm
|
||||
- model-merge
|
||||
- chimera
|
||||
language:
|
||||
- en
|
||||
pipeline_tag: text-generation
|
||||
---
|
||||
|
||||
# SmolLM-135M-SLERP-Merge
|
||||
|
||||
## Overview
|
||||
A **SLERP (Spherical Linear Interpolation) merge** of SmolLM-135M (base) and
|
||||
SmolLM-135M-Instruct. This "chimera" model blends raw language modeling capabilities
|
||||
with instruction-following abilities, creating a balanced model that inherits
|
||||
strengths from both parents.
|
||||
|
||||
## Key Features
|
||||
- **Dual heritage**: Combines base + instruct capabilities
|
||||
- **SLERP merge**: Uses spherical interpolation for better weight preservation
|
||||
- **Ultra-small**: Only ~513 MB total
|
||||
- **No training required**: Pure weight-space interpolation
|
||||
|
||||
## Merge Details
|
||||
- **Model A (base)**: [HuggingFaceTB/SmolLM-135M](https://huggingface.co/HuggingFaceTB/SmolLM-135M)
|
||||
- **Model B (instruct)**: [HuggingFaceTB/SmolLM-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM-135M-Instruct)
|
||||
- **Method**: SLERP (Spherical Linear Interpolation)
|
||||
- **Interpolation factor**: t=0.6 (60% instruct, 40% base)
|
||||
- **Weight matrices**: SLERP interpolation
|
||||
- **Biases/norms**: Linear interpolation
|
||||
|
||||
## Why SLERP?
|
||||
Linear interpolation (lerp) can reduce the magnitude of weight vectors, potentially
|
||||
degrading model quality. SLERP interpolates along the surface of a hypersphere,
|
||||
preserving vector magnitudes while smoothly transitioning between the two models.
|
||||
This typically produces higher quality merges.
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
|
||||
model = AutoModelForCausalLM.from_pretrained("Ringkvist/SmolLM-135M-SLERP-Merge")
|
||||
tokenizer = AutoTokenizer.from_pretrained("Ringkvist/SmolLM-135M-SLERP-Merge")
|
||||
|
||||
inputs = tokenizer("Explain what photosynthesis is:", return_tensors="pt")
|
||||
outputs = model.generate(**inputs, max_new_tokens=100, temperature=0.7)
|
||||
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
||||
```
|
||||
|
||||
## Merge Recipe (for reproduction with mergekit)
|
||||
```yaml
|
||||
slices:
|
||||
- sources:
|
||||
- model: HuggingFaceTB/SmolLM-135M
|
||||
layer_range: [0, 30]
|
||||
- model: HuggingFaceTB/SmolLM-135M-Instruct
|
||||
layer_range: [0, 30]
|
||||
merge_method: slerp
|
||||
base_model: HuggingFaceTB/SmolLM-135M
|
||||
parameters:
|
||||
t:
|
||||
- value: 0.6
|
||||
dtype: float16
|
||||
```
|
||||
|
||||
## Parent Models
|
||||
| Model | Role | Description |
|
||||
|-------|------|-------------|
|
||||
| [HuggingFaceTB/SmolLM-135M](https://huggingface.co/HuggingFaceTB/SmolLM-135M) | Base | Raw language modeling |
|
||||
| [HuggingFaceTB/SmolLM-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM-135M-Instruct) | Instruct | Instruction following |
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 0,
|
||||
"dtype": "float32",
|
||||
"eos_token_id": 0,
|
||||
"head_dim": 64,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 576,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 1536,
|
||||
"max_position_embeddings": 2048,
|
||||
"mlp_bias": false,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 9,
|
||||
"num_hidden_layers": 30,
|
||||
"num_key_value_heads": 3,
|
||||
"pretraining_tp": 1,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"tie_word_embeddings": true,
|
||||
"transformers_version": "4.57.6",
|
||||
"use_cache": true,
|
||||
"vocab_size": 49152
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 0,
|
||||
"eos_token_id": 0,
|
||||
"transformers_version": "4.57.6"
|
||||
}
|
||||
+48901
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c6381933666b8f1d657aa497b948f659fa28f4acfadb5c5e00c14d9bed9e256d
|
||||
size 538090408
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
"<|endoftext|>",
|
||||
"<|im_start|>",
|
||||
"<|im_end|>",
|
||||
"<repo_name>",
|
||||
"<reponame>",
|
||||
"<file_sep>",
|
||||
"<filename>",
|
||||
"<gh_stars>",
|
||||
"<issue_start>",
|
||||
"<issue_comment>",
|
||||
"<issue_closed>",
|
||||
"<jupyter_start>",
|
||||
"<jupyter_text>",
|
||||
"<jupyter_code>",
|
||||
"<jupyter_output>",
|
||||
"<jupyter_script>",
|
||||
"<empty_output>"
|
||||
],
|
||||
"bos_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"unk_token": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
+244949
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,168 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<|endoftext|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<|im_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"3": {
|
||||
"content": "<repo_name>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"4": {
|
||||
"content": "<reponame>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"5": {
|
||||
"content": "<file_sep>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"6": {
|
||||
"content": "<filename>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"7": {
|
||||
"content": "<gh_stars>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"8": {
|
||||
"content": "<issue_start>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"9": {
|
||||
"content": "<issue_comment>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"10": {
|
||||
"content": "<issue_closed>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"11": {
|
||||
"content": "<jupyter_start>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"12": {
|
||||
"content": "<jupyter_text>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"13": {
|
||||
"content": "<jupyter_code>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"14": {
|
||||
"content": "<jupyter_output>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"15": {
|
||||
"content": "<jupyter_script>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"16": {
|
||||
"content": "<empty_output>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"additional_special_tokens": [
|
||||
"<|endoftext|>",
|
||||
"<|im_start|>",
|
||||
"<|im_end|>",
|
||||
"<repo_name>",
|
||||
"<reponame>",
|
||||
"<file_sep>",
|
||||
"<filename>",
|
||||
"<gh_stars>",
|
||||
"<issue_start>",
|
||||
"<issue_comment>",
|
||||
"<issue_closed>",
|
||||
"<jupyter_start>",
|
||||
"<jupyter_text>",
|
||||
"<jupyter_code>",
|
||||
"<jupyter_output>",
|
||||
"<jupyter_script>",
|
||||
"<empty_output>"
|
||||
],
|
||||
"bos_token": "<|endoftext|>",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|endoftext|>",
|
||||
"extra_special_tokens": {},
|
||||
"model_max_length": 1000000000000000019884624838656,
|
||||
"tokenizer_class": "GPT2Tokenizer",
|
||||
"unk_token": "<|endoftext|>",
|
||||
"vocab_size": 49152
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"<|endoftext|>":0,"<|im_start|>":1,"<|im_end|>":2,"<repo_name>":3,"<reponame>":4,"<file_sep>":5,"<filename>":6,"<gh_stars>":7,"<issue_start>":8,"<issue_comment>":9,"<issue_closed>":10,"<jupyter_start>":11,"<jupyter_text>":12,"<jupyter_code>":13,"<jupyter_output>":14,"<jupyter_script>":15,"<empty_output>":16,"!":17,"\"":18,"#":19,"$":20,"%":21,"&":22,"'":23,"(":24,")":25,"*":26,"+":27,",":28,"-":29,".":30,"/":31,"0":32,"1":33,"2":34,"3":35,"4":36,"5":37,"6":38,"7":39,"8":40,"9":41,":":42,";":43,"<":44,"=":45,">":46,"?":47,"@":48,"A":49,"B":50,"C":51,"D":52,"E":53,"F":54,"G":55,"H":56,"I":57,"J":58,"K":59,"L":60,"M":61,"N":62,"O":63,"P":64,"Q":65,"R":66,"S":67,"T":68,"U":69,"V":70,"W":71,"X":72,"Y":73,"Z":74,"[":75,"\\":76,"]":77,"^":78,"_":79,"`":80,"a":81,"b":82,"c":83,"d":84,"e":85,"f":86,"g":87,"h":88,"i":89,"j":90,"k":91,"l":92,"m":93,"n":94,"o":95,"p":96,"q":97,"r":98,"s":99,"t":100,"u":101,"v":102,"w":103,"x":104,"y":105,"z":106,"{":107,"|":108,"}":109,"~":110,"¡":111,"¢":112,"£":113,"¤":114,"¥":115,"¦":116,"§":117,"¨":118,"©":119,"ª":120,"«":121,"¬":122,"®":123,"¯":124,"°":125,"±":126,"²":127,"³":128,"´":129,"µ":130,"¶":131,"·":132,"¸":133,"¹":134,"º":135,"»":136,"¼":137,"½":138,"¾":139,"¿":140,"Â":141,"Ã":142,"Ä":143,"Å":144,"Æ":145,"Ç":146,"È":147,"É":148,"Ê":149,"Ë":150,"Ì":151,"Í":152,"Î":153,"Ï":154,"Ð":155,"Ñ":156,"Ò":157,"Ó":158,"Ô":159,"Õ":160,"Ö":161,"×":162,"Ø":163,"Ù":164,"Ú":165,"Û":166,"Ü":167,"Ý":168,"Þ":169,"ß":170,"à":171,"á":172,"â":173,"ã":174,"ä":175,"å":176,"æ":177,"ç":178,"è":179,"é":180,"ê":181,"ë":182,"ì":183,"í":184,"î":185,"ï":186,"ð":187,"ó":188,"ô":189,"Ā":190,"ā":191,"Ă":192,"ă":193,"ą":194,"ć":195,"Ĉ":196,"ĉ":197,"Ċ":198,"ċ":199,"Č":200,"č":201,"Ď":202,"ď":203,"Đ":204,"đ":205,"Ē":206,"ĕ":207,"ė":208,"Ę":209,"ę":210,"Ě":211,"ě":212,"Ĝ":213,"Ğ":214,"ğ":215,"Ġ":216,"ġ":217,"Ģ":218,"ģ":219,"Ĥ":220,"ĥ":221,"Ħ":222,"ħ":223,"Ĩ":224,"ĩ":225,"Ī":226,"ī":227,"Ĭ":228,"ĭ":229,"Į":230,"į":231,"İ":232,"ı":233,"IJ":234,"ij":235,"Ĵ":236,"ĵ":237,"Ķ":238,"ķ":239,"ĸ":240,"Ĺ":241,"ĺ":242,"Ļ":243,"ļ":244,"Ľ":245,"ľ":246,"Ŀ":247,"ŀ":248,"Ł":249,"ł":250,"Ń":251,"Ġt":252,"Ġa":253,"in":254,"he":255,"ĠĠ":256,"re":257,"on":258,"er":259,"Ġthe":260,"at":261,"Ġs":262,"Ġo":263,"en":264,"Ġc":265,"es":266,"Ġw":267,"nd":268,"it":269,"or":270,"is":271,"al":272,"Ġp":273,"ing":274,"Ġf":275,"an":276,"ed":277,"Ġb":278,"ou":279,"ar":280,"Ġin":281,"Ġof":282,"Ġm":283,"Ġand":284,"ion":285,"ic":286,"Ġd":287,"Ġto":288,"ĠĠĠĠ":289,"le":290,"ro":291,"as":292,"ent":293,"Ġh":294,"Ġth":295,"ct":296,"Ġe":297,"Ġre":298,"el":299,"om":300,"il":301,"st":302,"Ġl":303,"Ġn":304,"et":305,"im":306,"ve":307,"ol":308,"ation":309,"Ġg":310,"id":311,"ĠT":312,"se":313,"Ġis":314,"ur":315,"ut":316,"ra":317,"ly":318,"ce":319,"ot":320,"âĢ":321,"ch":322,"ow":323,"ig":324,"Ġbe":325,"Ġu":326,"Ġfor":327,"Ġst":328,"Ġy":329,"ĠA":330,"ver":331,"am":332,"ĠĠĠ":333,"ĠS":334,"Ġon":335,"ul":336,"ir":337,"Ġthat":338,"ĠI":339,"ĠC":340,"ay":341,"if":342,"ith":343,"ad":344,"Ġcon":345,"Ġyou":346,"Ġas":347,"Ġpro":348,"her":349,"od":350,"Ġwith":351,"ter":352,"ĠĠĠĠĠĠĠĠ":353,"Ġan":354,"Ġor":355,"Ġwh":356,"Ġit":357,"ment":358,"Ġare":359,"Ġal":360,"ge":361,"ess":362,"ist":363,"Ġex":364,"Ġ(":365,"ers":366,"Ġde":367,"ate":368,"ab":369,"ies":370,"op":371,"ĠM":372,"th":373,"ect":374,"res":375,"us":376,"ĠP":377,"ĠThe":378,"Ġcom":379,"iv":380,"est":381,"um":382,"ity":383,"Ġhe":384,"qu":385,"Ġv":386,"ac":387,"ill":388,"ĠB":389,"ore":390,"em":391,"Ġwe":392,"Ġsu":393,"pp":394,"os":395,"ke":396,"and":397,"rom":398,"nt":399,"ld":400,"ort":401,"ain":402,"ant":403,"ive":404,"igh":405,"oc":406,"ĠH":407,"ĠW":408,"ial":409,"Ġch":410,"Ġby":411,"Ġr":412,"ud":413,"ĠE":414,"ĠĠĠĠĠĠĠ":415,"Ġcan":416,"âĢĻ":417,"Ġat":418,"un":419,"Ġne":420,"Ġha":421,"ĠD":422,"--":423,"ure":424,"Ġle":425,"ĠF":426,"Ġse":427,"ĠR":428,"Ġfrom":429,"Ġen":430,"ri":431,"pe":432,"ical":433,"art":434,"og":435,"Ġwas":436,"pt":437,"ions":438,"pl":439,"rou":440,"Ġnot":441,"ĠN":442,"Ġsh":443,"Ġim":444,"ight":445,"Ġ=":446,"out":447,"ĊĠĠĠĠĠĠĠ":448,"all":449,"ĠL":450,"Ġthis":451,"ĠG":452,"Ġab":453,"ag":454,"red":455,"per":456,"Ġhave":457,"Ġwor":458,"ĠâĢ":459,"gh":460,"our":461,"ine":462,"iz":463,"Ġint":464,"ome":465,"ĊĠĠĠĠĠĠĠĠ":466,"ust":467,"Ġus":468,"Ġyour":469,"ould":470,"act":471,"ĊĠĠĠ":472,"age":473,"ost":474,"Ġpl":475,"Ġ\"":476,"ard":477,"ell":478,"ther":479,"Ġtheir":480,"ult":481,"elf":482,"ated":483,"ff":484,"ich":485,"end":486,"ans":487,"ous":488,"ide":489,"ru":490,"ations":491,"ĠO":492,"Ġad":493,"ak":494,"Ġwhe":495,"du":496,"cl":497,"Ġcont":498,"Ġres":499,"ast":500,"Ġk":501,"Ġthey":502,"Ġcomp":503,"The":504,"ib":505,"'s":506,"orm":507,"ip":508,"cc":509,"Ġdis":510,"Ġall":511,"ap":512,"ame":513,"ĠU":514,"able":515,"ong":Line truncated
|
||||
Reference in new issue
Block a user