Commit 020a856
authored
Add --is-preformatted flag to prepare_hidden_states.py (#350)
* Add --is-preformatted flag to prepare_hidden_states.py
Added support for preformatted input data in prepare_hidden_states.py,
matching the existing flag in train_eagle3.py. This allows users to skip
chat template application when their data already has the template applied.
Changes:
- Added --is-preformatted argument to data group
- Updated cache key to include is_preformatted for proper caching
- Pass is_preformatted to build_eagle3_dataset()
* Update documentation for --is-preformatted flag in prepare_hidden_states.py
- Updated script docstring with usage example for --is-preformatted
- Updated data_preparation.md to document --is-preformatted for offline training
* Address code review: add --output-path to docstring example
Added back the --output-path argument to the first usage example in the
docstring for clarity and consistency with the pre-formatted data example.1 parent 381476b commit 020a856
2 files changed
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
| |||
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
| |||
558 | 574 | | |
559 | 575 | | |
560 | 576 | | |
561 | | - | |
| 577 | + | |
562 | 578 | | |
563 | 579 | | |
564 | 580 | | |
| |||
572 | 588 | | |
573 | 589 | | |
574 | 590 | | |
| 591 | + | |
575 | 592 | | |
576 | 593 | | |
577 | 594 | | |
| |||
0 commit comments