æ¨¡åæ£æ¥ç¹ç示ä¾Python代ç | AIçæåç¿»è¯
æ¨æä¸¤ä¸ªå¯ç¨çæ£æ¥ç¹ã以䏿¯ç¤ºä¾å½ä»¤ï¼
ä½¿ç¨æ¨ç FineWeb æ£æ¥ç¹ï¼GPT-2 飿 ¼ï¼BPE åè¯å¨ï¼ï¼
python sample.py \
--out_dir=out-fineweb \
--start="The future of artificial intelligence is" \
--num_samples=3 \
--max_new_tokens=200
ä½¿ç¨æ¨çè士æ¯äºåç¬¦çº§æ£æ¥ç¹ï¼
python sample.py \
--out_dir=out-shakespeare-char \
--start="To be or not to be" \
--num_samples=3 \
--max_new_tokens=200
使ç¨é¢è®ç»ç GPT-2ï¼æ 鿬尿£æ¥ç¹ï¼ï¼
python sample.py \
--init_from=gpt2 \
--start="Once upon a time" \
--num_samples=2 \
--max_new_tokens=100
sample.py çå
³é®åæ°ï¼
