Text Generation
Transformers
Safetensors
English
metadiffusion
diffusion
diffusion-lm
ar-to-diffusion
custom_code
CodeSoft commited on
Commit
18eebaf
·
verified ·
1 Parent(s): 6f36850

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -10
README.md CHANGED
@@ -76,38 +76,38 @@ print(tok.decode(out[0], skip_special_tokens=True))
76
 
77
  # Chat with it (chat.py)
78
  ```bash
79
- python3 MetaDiffusion-600M-ChatBase/scripts/chat.py \
80
- --model-path MetaDiffusion-600M-ChatBase/model.safetensors \
81
- --tokenizer MetaDiffusion-600M-ChatBase/tokenizer \
82
  --im-end-bias 2.0 --im-end-bias-t 0.3 --watch
83
  ```
84
  ## Fine-tune (train.py)
85
 
86
  ```bash
87
  # 1. Init: convert the AR model to a diffusion init
88
- python scripts/convert.py --source Qwen/Qwen3-0.6B \
89
  --output init/metadiffusion-600M-instruct.pt \
90
  --tokenizer-out data/tokenizer
91
 
92
  # 2. Corpus: smol, opc, math and no_robots, or a local --jsonl of {"messages": [...]} rows.
93
  # --val-fraction holds out a disjoint val set for early stopping.
94
- python scripts/prepare_data.py --datasets smol,math --out data \
95
  --val-fraction 0.05
96
 
97
  # 3. Train (defaults: lr 5e-5, bf16, seq 512, batch auto-detected)
98
- python scripts/train.py --init-checkpoint init/metadiffusion-600M-instruct.pt \
99
  --data-dir data --output-dir checkpoints --max-steps 30000
100
 
101
  # 4. Continue a run: checkpoints carry model + optimizer + scheduler
102
  # state, so --resume-from picks up LR position and momentum exactly
103
- python scripts/train.py --init-checkpoint init/metadiffusion-600M-instruct.pt \
104
- --data-dir data --output-dir checkpoints_p3 \
105
  --resume-from checkpoints_p2/step_20000.pt --max-steps 16000
106
 
107
  # 5. Test, then ship
108
- python scripts/chat.py --model-path checkpoints_p3/step_30000.pt \
109
  --tokenizer data/tokenizer --watch
110
- python scripts/export_hf.py --checkpoint checkpoints_p3/step_30000.pt \
111
  --tokenizer data/tokenizer --output MetaDiffusion-600M-ChatBase
112
  ```
113
  ## Limitations
 
76
 
77
  # Chat with it (chat.py)
78
  ```bash
79
+ python chat.py \
80
+ --model-path model.safetensors \
81
+ --tokenizer ./tokenizer \
82
  --im-end-bias 2.0 --im-end-bias-t 0.3 --watch
83
  ```
84
  ## Fine-tune (train.py)
85
 
86
  ```bash
87
  # 1. Init: convert the AR model to a diffusion init
88
+ python convert.py --source Qwen/Qwen3-0.6B \
89
  --output init/metadiffusion-600M-instruct.pt \
90
  --tokenizer-out data/tokenizer
91
 
92
  # 2. Corpus: smol, opc, math and no_robots, or a local --jsonl of {"messages": [...]} rows.
93
  # --val-fraction holds out a disjoint val set for early stopping.
94
+ python prepare_data.py --datasets smol,math --out data \
95
  --val-fraction 0.05
96
 
97
  # 3. Train (defaults: lr 5e-5, bf16, seq 512, batch auto-detected)
98
+ python train.py --init-checkpoint init/metadiffusion-600M-instruct.pt \
99
  --data-dir data --output-dir checkpoints --max-steps 30000
100
 
101
  # 4. Continue a run: checkpoints carry model + optimizer + scheduler
102
  # state, so --resume-from picks up LR position and momentum exactly
103
+ python train.py --init-checkpoint init/metadiffusion-600M-instruct.pt \
104
+ --data-dir data --output-dir checkpoints \
105
  --resume-from checkpoints_p2/step_20000.pt --max-steps 16000
106
 
107
  # 5. Test, then ship
108
+ python chat.py --model-path checkpoints_/step_30000.pt \
109
  --tokenizer data/tokenizer --watch
110
+ python export_hf.py --checkpoint checkpoints/step_30000.pt \
111
  --tokenizer data/tokenizer --output MetaDiffusion-600M-ChatBase
112
  ```
113
  ## Limitations