Skip to content

Commit

Permalink
update cross stream chat
Browse files Browse the repository at this point in the history
  • Loading branch information
1049451037 committed Dec 5, 2023
1 parent a33ddfc commit e6abe2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sat/generation/autoregressive_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,14 @@ def stream_filling_sequence(
else:
log_attention_weights_part = None

if mems_cross is not None or 'encoder_outputs' not in kw_args:
kw_args['encoder_outputs'] = mems_cross

logits, *output_per_layers = model(
input_ids=tokens[:, index:],
position_ids=position_ids[..., index: counter+1],
attention_mask=attention_mask[..., index: counter+1, :counter+1], # TODO memlen
mems=mems,
mems_cross=mems_cross,
log_attention_weights=log_attention_weights_part,
**kw_args
)
Expand Down

0 comments on commit e6abe2a

Please sign in to comment.