add LFM2-1.2B, LFM2.5-1.2B-Instruct
This commit is contained in:
@@ -110,6 +110,14 @@ impl TokenizerModel {
|
||||
.map_err(|e| anyhow!(format!("tokenizer encode error{}", e)))?;
|
||||
Ok(decode)
|
||||
}
|
||||
|
||||
pub fn token_decode_with_special(&self, tokens: Vec<u32>) -> Result<String> {
|
||||
let decode = self
|
||||
.tokenizer
|
||||
.decode(&tokens, false)
|
||||
.map_err(|e| anyhow!(format!("tokenizer encode error{}", e)))?;
|
||||
Ok(decode)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn sentencepiece_encode(
|
||||
|
||||
Reference in New Issue
Block a user