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

Add support for Qwen #103

Merged
merged 12 commits into from
Dec 5, 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
Next Next commit
WIP: qwen
  • Loading branch information
tgaddair committed Dec 5, 2023
commit 68328814fce079e23b87da9196991839077f02be
15 changes: 15 additions & 0 deletions server/lorax_server/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
from lorax_server.models.flash_llama import (
FlashLlama,
)
from lorax_server.models.flash_qwen import FlashQwen
from lorax_server.models.flash_santacoder import (
FlashSantacoderSharded,
)
Expand All @@ -65,6 +66,7 @@
__all__.append(FlashRWSharded)
__all__.append(FlashSantacoderSharded)
__all__.append(FlashLlama)
__all__.append(FlashQwen)

MISTRAL = True
try:
Expand Down Expand Up @@ -281,6 +283,19 @@ def get_model(
trust_remote_code=trust_remote_code,
)
raise NotImplementedError("Mistral model requires flash attention v2")

if model_type == "qwen":
if MISTRAL:
return FlashQwen(
model_id,
adapter_id,
adapter_source,
revision,
quantize=quantize,
dtype=dtype,
trust_remote_code=trust_remote_code,
)
raise NotImplementedError("Qwen model requires flash attention v2")

if model_type == "opt":
return OPTSharded(
Expand Down
Loading