Skip to content

Commit

Permalink
[LLM] Support bloom prefix (#2248)
Browse files Browse the repository at this point in the history
* support bloom prefix

* support_bloom_prefix

* support bloom prefix

* Update code for bloom prefix

* update code

* support bloom prefix
  • Loading branch information
rainyfly authored Oct 19, 2023
1 parent 2f2c824 commit 66a4897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llm/fastdeploy_llm/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,11 @@ def get_alibi_slopes(num_heads):
inputs["attention_mask"] = (
alibi_encoder + (1 - inputs["attention_mask"]
) * paddle.finfo(inputs["attention_mask"].dtype).min)
attention_mask = inputs["attention_mask"]
tgt_generation_mask = inputs["tgt_generation_mask"]
inputs["tgt_generation_mask"] = (
alibi_decoder + (1 - inputs["tgt_generation_mask"]) *
paddle.finfo(inputs["tgt_generation_mask"].dtype).min)
attention_mask = inputs["attention_mask"]
tgt_generation_mask = inputs["tgt_generation_mask"]


def dy_input_preprocess(inputs):
Expand Down

0 comments on commit 66a4897

Please sign in to comment.