@eliebakouch:我最喜欢的项目之一是斯坦福团队的Marin,他们采用科学的方法进行训练,并且愿意……

X AI KOLs Following 工具

摘要

Marin是斯坦福大学开发的开源框架,用于可复现的基础模型研究,涵盖数据整理、分词、训练和评估;它被用于训练一个80亿参数的模型,其性能超过了Llama 3.1 8B。

我最喜欢的项目之一是斯坦福团队的Marin,他们采用科学的方法进行训练,愿意承担风险,并且完全开放(甚至是开放开发,你可以在GitHub上跟踪一切!) https://t.co/G12JfPlFJP https://t.co/pQYgKgtGNG
查看原文
查看缓存全文

缓存时间: 2026/06/08 03:14

我最喜欢的项目之一是斯坦福团队开发的 Marin,他们采用科学方法进行训练,敢于承担风险,并且完全开源(甚至公开开发进程,你可以在 GitHub 上跟踪所有进展!) https://t.co/G12JfPlFJP https://t.co/pQYgKgtGNG — # marin-community/marin 来源: https://github.com/marin-community/marin # Marin > “我不畏惧风暴,因为我正在学习如何驾驭我的船。”> – 路易莎·梅·奥尔科特 Marin (https://marin.community) 是一个用于基础模型 (https://en.wikipedia.org/wiki/Foundation_model) 研究与开发的开源框架。Marin 的一个关键特性是可复现性:从原始数据到最终模型的每一步都被记录下来,而不仅仅是最终结果。这包括失败的实验,因此整个研究过程都是透明的。Marin 的主要用途是训练像 Llama、DeepSeek、Qwen 这样的语言模型。值得注意的是,这包括数据整理、转换、过滤、分词、训练和评估。我们使用 Marin 训练了第一个开源 8B 参数模型,其性能超过了 Llama 3.1 8B。您可以查看训练脚本 (https://github.com/marin-community/marin/blob/main/experiments/tootsie/exp600_tootsie.py) 或阅读回顾。Marin 的文档可在 ReadTheDocs (https://marin.readthedocs.io/en/latest/) 或 docs/ 文件夹中找到。要开始使用 Marin: - 安装 Marin。 - 使用 Marin 训练一个微型语言模型。 - 查看如何使用 Marin 运行更大的 DCLM 1B/1x 实验。 - 查看我们已运行实验的摘要。 - 加入 Marin Discord (https://discord.gg/J9CTk7pqcM) 与社区交流。 ## 示例 Marin 实验被定义为一组可以相互依赖的步骤,并按拓扑顺序执行,类似于 Makefile。作为如何使用 Marin 的简短示例,以下是一个在 TinyStories (https://huggingface.co/datasets/roneneldan/TinyStories) 上训练微型模型的完整脚本。您可以查看完整脚本 (https://github.com/marin-community/marin/blob/main/experiments/tutorials/train_tiny_model_cpu.py) 了解更多详情。 python from fray.cluster import ResourceConfig from experiments.defaults import default_tokenize, default_train from experiments.llama import llama3_tokenizer, llama_nano from experiments.simple_train_config import SimpleTrainConfig from marin.execution.executor import executor_main # 1. 选择数据集 tinystories_hf_id = "roneneldan/TinyStories" # 2. 对数据集进行分词 tinystories_tokenized = default_tokenize( name=tinystories_hf_id, # 写入分词文件的路径(会自动添加 tokenized/) dataset=tinystories_hf_id, # HF 数据集 ID tokenizer=llama3_tokenizer, ) # 3. 定义训练配置 nano_train_config = SimpleTrainConfig( # 这里定义所需的硬件资源 resources=ResourceConfig.with_cpu(), train_batch_size=4, num_train_steps=100, # 设置超参数 learning_rate=6e-4, weight_decay=0.1, # 为教程保持快速评估 max_eval_batches=4, ) # 4. 训练模型 nano_tinystories_model = default_train( name="marin-nano-tinystories", # 步骤可以依赖于其他步骤:nano_tinystories_model 依赖于 tinystories_tokenized tokenized=tinystories_tokenized, model_config=llama_nano, train_config=nano_train_config, # wandb 标签 tags=["llama", "nano", "tinystories", "tutorial"], # 我们可以在训练循环中运行多个 eval_harness (https://github.com/EleutherAI/lm-evaluation-harness) 任务 # 但在如此小的模型上运行评估没有意义 eval_harness_tasks=[], # 为保持教程快速,跳过默认验证集 use_default_validation=False, ) if __name__ == "__main__": executor_main(steps=[ nano_tinystories_model, ]) 在这里,我们创建了两个步骤:一个用于对数据集进行分词,另一个用于训练模型。训练步骤依赖于分词后的数据集步骤,因此它将在分词步骤完成后执行。稍加修改,您就可以将其扩展到在更大的数据集上训练更大的模型,或使用混合数据集,甚至可以扩展到非常大的 TPU 集群(或多切片 TPU,以及很快将支持的多节点 GPU!)。 ## 智能体技能 - 查看 .agents/skills/(以及 .claude/skills/)以获取可加载的智能体技能。例如,.agents/skills/add-dataset/ 包含添加新数据集的逐步指南。 > Lucas Beyer (bl16) (@giffmana): > 我理解得对吗,OLMo 从头开始的系列即将结束? > > 如果是这样,看来 NVIDIA 及时推出了 Nemotron 模型,成为唯一仍保持完全开源(即不仅仅是权重开源)从头开始训练的大语言模型团队。

相似文章