Optimize Qwen3.8 inference on Apple silicon

This commit is contained in:
Georg Bauer committed 2026-09-04 23:27:09 +02:00
1 parent bf82df77cb
commit bd6353804b
14 files changed
+10149 -1145

No files matched your search

+1 -4
View File
@@ -62,7 +62,6 @@ struct QwenTokenizerFile {
struct QwenAddedToken {
id: usize,
content: String,
special: bool,
}
#[derive(Deserialize)]
@@ -225,9 +224,7 @@ impl Tokenizer {
));
}
tokens[token.id] = token.content.as_bytes().to_vec();
if token.special {
rendered_specials.push((token.content.into_bytes(), token.id as i32));
}
rendered_specials.push((token.content.into_bytes(), token.id as i32));
}
if tokens[..=maximum].iter().any(Vec::is_empty) {
return Err("Qwen tokenizer token ids are not contiguous".into());