mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
Don't actually modify the inputs.
This commit is contained in:
parent
bfe062ee99
commit
168ec6b145
@ -372,11 +372,12 @@ fn prepare_input(
|
|||||||
if let Some(truncate) = truncate {
|
if let Some(truncate) = truncate {
|
||||||
if truncate < encoding.len() {
|
if truncate < encoding.len() {
|
||||||
encoding.truncate(truncate, 0, TruncationDirection::Left);
|
encoding.truncate(truncate, 0, TruncationDirection::Left);
|
||||||
|
// inputs = tokenizer
|
||||||
|
// .decode(encoding.get_ids(), false)
|
||||||
|
// .map_err(|err| ValidationError::Tokenizer(err.to_string()))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let inputs = tokenizer
|
|
||||||
.decode(encoding.get_ids(), false)
|
|
||||||
.map_err(|err| ValidationError::Tokenizer(err.to_string()))?;
|
|
||||||
Ok((encoding, inputs))
|
Ok((encoding, inputs))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user