自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

來了!Kimi開源Moonlight-16B-A3B的MoE模型?。?

發(fā)布于 2025-2-25 12:49
瀏覽
0收藏

言簡意賅,發(fā)現(xiàn)月之暗面開源MoE模型,總參數(shù)量15.29B,激活參數(shù)2.24B,使用Muon優(yōu)化器,在5.7T Tokens的訓(xùn)練數(shù)據(jù)下,拿到了很好的效果。

Github:https://github.com/MoonshotAI/Moonlight

HF:https://huggingface.co/moonshotai/Moonlight-16B-A3B

Paper:https://github.com/MoonshotAI/Moonlight/blob/master/Moonlight.pdf

效果如下:

來了!Kimi開源Moonlight-16B-A3B的MoE模型?。?AI.x社區(qū)

來了!Kimi開源Moonlight-16B-A3B的MoE模型?。?AI.x社區(qū)

比較 Muon 和 Adam 的擴(kuò)展定律實(shí)驗(yàn),發(fā)現(xiàn)Muon 的樣本效率比 Adam 高 2 倍。

來了!Kimi開源Moonlight-16B-A3B的MoE模型!!-AI.x社區(qū)

Muon 優(yōu)化器原理如下:

來了!Kimi開源Moonlight-16B-A3B的MoE模型?。?AI.x社區(qū)

同時(shí),Moonlight-16B-A3B的模型架構(gòu)與DeepSeek-V3一致。

HF快速使用:

from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "moonshotai/Moonlight-16B-A3B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
    model_path,
    torch_dtype="auto",
    device_map="auto",
    trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

messages = [
    {"role": "system", "content": "You are a helpful assistant provided by Moonshot-AI."},
    {"role": "user", "content": "Is 123 a prime?"}
]
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
generated_ids = model.generate(inputs=input_ids, max_new_tokens=500)
response = tokenizer.batch_decode(generated_ids)[0]
print(response)

本文轉(zhuǎn)載自??NLP工作站??,作者: 劉聰NLP 


標(biāo)簽
已于2025-2-25 13:57:45修改
收藏
回復(fù)
舉報(bào)
回復(fù)
相關(guān)推薦