CS336.wiki
CS336 中文实验手册/实验与消融
反馈与讨论
ASSIGNMENT 01 / 7.4

OpenWebText 实验

2026 春季 · v26.0.3原文 p. 44–45对照 PDF ↗

7.4 在 OpenWebText 上运行#

接下来使用来自网页抓取、更接近标准预训练场景的数据。课程提供了 OpenWebText [2] 的小型子集,也是一个单独文本文件,获取方式见第 1 节。

与 TinyStories 相比,它更真实、复杂、多样。建议浏览训练集,体会网页语料的特点。

原文示例 owt_example

OpenWebText 样例

Baseball Prospectus 的技术总监 Harry Pavlidis 雇用 Jonathan Judge 时冒了一个险。

Pavlidis 知道,正如 Alan Schwarz 在《The Numbers Game》中所写,美国文化中,没有哪个领域像棒球运动员的表现一样,被如此精确地计数、如此热情地量化。只需点击几下,就能查到 Noah Syndergaard 的快速球飞向本垒时每分钟旋转超过 2,100 次,Nelson Cruz 在 2016 年合格击球手中拥有最高的平均击球初速,以及无数像从电子游戏或科幻小说中摘出的细节。不断增长的数据海洋,使棒球文化中一个越来越重要的角色获得力量:业余分析爱好者。

这种力量也带来更多审视,不仅针对测量,也针对背后的人和出版机构。Pavlidis 很清楚量化不完美会给 Baseball Prospectus 带来怎样的批评。他也知道,网站的捕手指标需要重做,必须由能够解决复杂统计建模问题的人完成。

“他让我们感到震惊。”——Harry Pavlidis

根据 Judge 的文章,以及两人在网站主办的球场活动中的交流,Pavlidis 直觉认为 Judge “懂行”。……

以上为原语料示例的译文,实际训练文本仍为英文。

本实验可能需要重新调节学习率、批次大小等超参数。

练习 main_experiment2 分 · 2 B200 小时

OpenWebText 实验

使用与 TinyStories 相同的模型架构和总训练迭代次数,在 OpenWebText 上训练,观察模型表现。

交付物: 模型在 OpenWebText 上的学习曲线。描述与 TinyStories 的损失差异,说明应该怎样理解这些损失。

交付物: 与 TinyStories 部分相同格式的生成文本。流畅度如何?为什么模型和计算预算相同,生成质量却更差?

一起把这一章读得更好

发现翻译、公式或排版错误?欢迎反馈。概念疑问和学习心得,也可以在本章讨论中交流。

直接选中正文,点击旁边的「反馈这处错误」,即可在页内填写并提交,无需登录。
English original 展开本章英文原文 PDF 文本提取

下列文本提取自本地原版 PDF。图表和公式的准确布局请对照 PDF。

7.4 Running on OpenWebText
We will now move to a more standard pretraining dataset created from a web crawl. A small sample of
OpenWebText [A. Gokaslan et al., 2019] is also provided as a single text file: see Section 1 for how to
access this file.
Here is an example from OpenWebText. Note how the text is much more realistic, complex, and varied.
You may want to look through the training dataset to get a sense of what training data looks like for a
web-scraped corpus.


 Example (owt_example): One example from OWT


   Baseball Prospectus director of technology Harry Pavlidis took a risk when he hired Jonathan
   Judge.
   Pavlidis knew that, as Alan Schwarz wrote in The Numbers Game, “no corner of American
   culture is more precisely counted, more passionately quantified, than performances of baseball
   players.” With a few clicks here and there, you can find out that Noah Syndergaard’s fastball
   revolves more than 2,100 times per minute on its way to the plate, that Nelson Cruz had the
   game’s highest average exit velocity among qualified hitters in 2016 and myriad other tidbits that
   seem ripped from a video game or science fiction novel. The rising ocean of data has empowered
   an increasingly important actor in baseball’s culture: the analytical hobbyist.
   That empowerment comes with added scrutiny – on the measurements, but also on the people
   and publications behind them. With Baseball Prospectus, Pavlidis knew all about the backlash
   that accompanies quantitative imperfection. He also knew the site’s catching metrics needed to be
   reworked, and that it would take a learned mind – someone who could tackle complex statistical
   modeling problems – to complete the job.
   “He freaks us out.” Harry Pavlidis
   Pavlidis had a hunch that Judge “got it” based on the latter’s writing and their interaction at a
   site-sponsored ballpark event. […]

Note: You may have to re-tune your hyperparameters such as learning rate or batch size for this
experiment.


 Problem (main_experiment): Experiment on OWT (2 B200 hrs) (2 points)


    Train your language model on OpenWebText with the same model architecture and total training
    iterations as TinyStories. How well does this model do?
    Deliverable: A learning curve of your language model on OpenWebText. Describe the difference
    in losses from TinyStories – how should we interpret these losses?
    Deliverable: Generated text from OpenWebText LM, in the same format as the TinyStories
    outputs. How is the fluency of this text? Why is the output quality worse even though we have
    the same model and compute budget as TinyStories?

关于这一章的疑问、理解与心得,都可以在这里交流。阅读无需登录;发表评论或回复时使用 GitHub 账号。

正在加载本章讨论…

欢迎交流概念与阅读疑问,请勿发布作业完整实现或题目答案。

输入中文、英文术语或题号,例如 RoPE、检查点、train_bpe。