Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Falcon support #890

Merged
merged 5 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
KexinFeng committed Jun 30, 2023
commit 8816b47ebf6da8a6276652bf7a27e8c476b866e0
2 changes: 1 addition & 1 deletion engines/python/setup/djl_python/scheduler/lm_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def forward(self, input_ids: torch.tensor, position_ids: torch.tensor,
past_key_values = output.past_key_values

# Post-process
_, kv_dim, seq_len = past_key_values[0][0].shape
_, seq_len, kv_dim = past_key_values[0][0].shape
new_kv_list = []
for k, v in past_key_values:
k_new = k.view(batch_size, -1, seq_len, kv_dim)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def test_contrastive_scheduler_falcon(self):
"When your legs don't work like they used to before And I can't sweep you off",
return_tensors='pt')
input_ids_2 = torch.concat([
torch.tensor([PAD, PAD, PAD, PAD]),
torch.tensor([PAD, PAD, PAD, PAD, PAD, PAD]),
tokenizer.encode(
"There's a time that I remember, when I did not know",
return_tensors='pt')[0]
Expand Down