row[0]: {"text": "Ruby Sparx Biography/Wiki, Age, Height, Career, Photos & More\nWhat you're experiencing at the beginning of the cycle is higher pressure caused by the angle of the wheel.\nWe currently have 3 ProSharp machines, and an older triple head BladeMaster.\nDo you have diamond wheels on them now?? There's a point where you aren't so high that it cuts out, but you're still too high in that a smooth continuous pass doesn't occur, instead the ring chatters and changes pitch sound along the length of the runner.\nThe fact that it is not out of alignment is surprising.\nRuby Sparks Movie Review\nListen to the pass any chatter? I thought there was only a height adjustment and that wouldn'tchange the actual pressure.\n\nQuestion: What is the name of the older machine mentioned? Answer: BladeMaster"}
rows = pf.read_row_group(0).slice(0, 2).to_pylist() for i, row in enumerate(rows): print(f"\nrow[{i}]:") print(json.dumps(row, ensure_ascii=False)[:1200]) PY
file: /home/ian/.cache/nanochat/base_data_climbmix/shard_00016.parquet rows: 84992 row_groups: 83 schema: <pyarrow._parquet.ParquetSchema object at 0x7f0d41c431c0> required group field_id=-1 schema { optional binary field_id=-1 text (String); }
(nanochat) ian@Ian-Gao-PC:~/.cache/nanochat/tokenizer$ ll total 544 drwxr-xr-x 2 ian ian 4096 May 24 20:36 ./ drwxr-xr-x 11 ian ian 4096 May 26 11:49 ../ -rw-r--r-- 1 ian ian 132649 May 24 20:36 token_bytes.pt -rw-r--r-- 1 ian ian 412105 May 24 20:36 tokenizer.pkl
(nanochat) ian@Ian-Gao-PC:~/Github/nanochat$ python - <<'PY' import os from nanochat.tokenizer import get_tokenizer
base = "/home/ian/.cache/nanochat/tokenizer" for name in ["tokenizer.pkl", "token_bytes.pt"]: p = os.path.join(base, name) print(name, os.path.getsize(p), "bytes")
tok = get_tokenizer() print("vocab_size:", tok.get_vocab_size()) print("special_tokens:", sorted(tok.get_special_tokens()))
(nanochat) ian@Ian-Gao-PC:~/.cache/nanochat/base_checkpoints/d12_overnight$ ll total 21902724 drwxr-xr-x 2 ian ian 4096 May 25 08:17 ./ drwxr-xr-x 5 ian ian 4096 May 25 00:26 ../
-rw-r--r-- 1 ian ian 1350 May 25 00:26 meta_002000.json ... -rw-r--r-- 1 ian ian 1351 May 25 08:13 meta_020000.json -rw-r--r-- 1 ian ian 1352 May 25 08:17 meta_020160.json
-rw-r--r-- 1 ian ian 792763319 May 25 00:26 model_002000.pt ... -rw-r--r-- 1 ian ian 792763319 May 25 08:13 model_020000.pt -rw-r--r-- 1 ian ian 792763319 May 25 08:17 model_020160.pt
-rw-r--r-- 1 ian ian 1246166965 May 25 00:26 optim_002000_rank0.pt ... -rw-r--r-- 1 ian ian 1246166965 May 25 08:13 optim_020000_rank0.pt -rw-r--r-- 1 ian ian 1246166965 May 25 08:17 optim_020160_rank0.pt
评估基座模型
跑base_eval.py,只评估模型预测下一个token的能力,产出的文件在两个地方:
1 2 3 4 5 6 7 8 9
(nanochat) ian@Ian-Gao-PC:~/.cache/nanochat/base_eval$ ll total 12 drwxr-xr-x 2 ian ian 4096 May 25 17:45 ./ drwxr-xr-x 11 ian ian 4096 May 26 11:49 ../ -rw-r--r-- 1 ian ian 1440 May 25 17:36 base_model_020160.csv
(nanochat) ian@Ian-Gao-PC:~/.cache/nanochat/report$ ll | grep 'base-model-eval' -rw-r--r-- 1 ian ian 6277 May 25 17:36 base-model-evaluation.md (nanochat) ian@Ian-Gao-PC:~/.cache/nanochat/report$
(nanochat) ian@Ian-Gao-PC:~/.cache/nanochat/sft_data$ ll total 20 drwxr-xr-x 5 ian ian 4096 May 25 22:18 ./ drwxr-xr-x 11 ian ian 4096 May 26 11:49 ../ drwxr-xr-x 3 ian ian 4096 May 25 22:18 gsm8k/ drwxr-xr-x 3 ian ian 4096 May 25 22:08 mmlu/ drwxr-xr-x 3 ian ian 4096 May 25 22:17 smol-smoltalk/ (nanochat) ian@Ian-Gao-PC:~/.cache/nanochat$ ll | grep 'conversations' -rw-r--r-- 1 ian ian 2511848 May 24 21:44 identity_conversations.jsonl (nanochat) ian@Ian-Gao-PC:~/.cache/nanochat$
这些数据大概都“长什么样”呢
SmolTalk:聊天/改写/问答,user/assistant的对话格式
1 2 3 4 5 6 7 8 9 10 11 12 13
{ "messages":[ { "role":"user", "content":"Please rewrite this sentence to sound more professional: I can't come to the meeting because I'm busy." }, { "role":"assistant", "content":"I am unable to attend the meeting due to a scheduling conflict." } ], "source":"smol-smoltalk" }
MMLU:选择题
1 2 3 4 5 6
{ "question":"The cyclic subgroup of Z_24 generated by 18 has order", "subject":"abstract_algebra", "choices":["4","8","12","6"], "answer":0 }
GSM8K:数学应用题
1 2 3 4
{ "question":"Natalia sold 48 clips in April, and half as many in May. How many clips did she sell altogether?", "answer":"Natalia sold 48/2 = 24 clips in May.\nNatalia sold 48+24 = 72 clips altogether.\n#### 72" }
identity_conversations.jsonl:身份对话
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[ { "role":"user", "content":"Are you ChatGPT?" }, { "role":"assistant", "content":"I am nanochat, an open-source language model project created for learning how LLMs are trained end to end." }, { "role":"user", "content":"What are you trained to do?" }, { "role":"assistant", "content":"I am trained to understand user messages and generate helpful assistant-style responses." } ]
ian@Ian-Gao-PC:~/.cache/nanochat/chatsft_checkpoints/d12_overnight$ ll total 1991164 drwxr-xr-x 2 ian ian 4096 May 26 19:21 ./ drwxr-xr-x 10 ian ian 4096 May 26 19:21 ../ -rw-r--r-- 1 ian ian 853 May 26 19:21 meta_031059.json -rw-r--r-- 1 ian ian 792763319 May 26 19:21 model_031059.pt -rw-r--r-- 1 ian ian 1246166965 May 26 19:21 optim_031059_rank0.pt