Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
lizhiping
text-generation-inference
Commits
2762e688
Commit
2762e688
authored
1 year ago
by
drbh
Browse files
Options
Download
Email Patches
Plain Diff
fix: include fsm_grammar_states in FlashMistralBatch from_pb
parent
ff42d33e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
server/text_generation_server/models/flash_mistral.py
server/text_generation_server/models/flash_mistral.py
+3
-1
No files found.
server/text_generation_server/models/flash_mistral.py
View file @
2762e688
...
...
@@ -98,6 +98,7 @@ class FlashMistralBatch(FlashCausalLMBatch):
prefill_cu_outlens
=
[
0
]
next_token_chooser_parameters
=
[]
fsm_grammar_states
=
[]
stopping_criterias
=
[]
top_n_tokens
=
[]
...
...
@@ -136,6 +137,7 @@ class FlashMistralBatch(FlashCausalLMBatch):
cu_seqlen_prefill
.
append
(
cumulative_length
+
input_length
)
next_token_chooser_parameters
.
append
(
r
.
parameters
)
fsm_grammar_states
.
append
(
r
.
fsm_grammar_state
)
stopping_criteria
=
StoppingCriteria
.
from_pb
(
r
.
stopping_parameters
,
tokenizer
...
...
@@ -204,7 +206,7 @@ class FlashMistralBatch(FlashCausalLMBatch):
)
next_token_chooser
=
HeterogeneousNextTokenChooser
.
from_pb
(
next_token_chooser_parameters
,
dtype
,
device
,
tokenizer
next_token_chooser_parameters
,
dtype
,
device
,
tokenizer
,
fsm_grammar_states
)
start_slots
=
torch
.
tensor
(
start_slots
,
dtype
=
torch
.
int64
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment