Commit e01a1c3
committed
refactor(models, ffi): Improve PretrainedModel structure, generation logic, and FFI usage
- Reorganized methods within `PretrainedModel` for better readability and logical flow
- Fixed usage logic for various LogitsProcessors including `NoBadWordsLogitsProcessor`, `MinNewTokensLengthLogitsProcessor`, `ForcedBOSTokenLogitsProcessor`, and `SuppressTokensAtBeginLogitsProcessor`.
- Removed usage of `ForceTokensLogitsProcessor`.
- Refactored `Samplerate` and `Sndfile` FFI wrappers from static methods to an instance-based approach.1 parent a7dbad6 commit e01a1c3
File tree
28 files changed
+2152
-1874
lines changed- examples
- pipelines
- src
- FFI
- Generation/LogitsProcessors
- Models
- Pretrained
- Pipelines
- Utils
- tests/ffi
28 files changed
+2152
-1874
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
0 commit comments