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

🦙 Llama3 on TGI - Jetstream Pytorch #90

Merged
merged 9 commits into from
Sep 10, 2024
Merged

Conversation

tengomucho
Copy link
Collaborator

What does this PR do?

Add support for Llama 3 (Llama 3.1 will come later), fixing some issues with some model settings.
Also tests have been rearranged, so slow tests run with bigger models.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

This is a workaround to avoid a core dump observed when testing on
TinyLLama-v0 model.
It should allow to prevent other similar problems later.
This allows to add again the basic test (not slow) that will run on PRs
and check Jetstream/Pytorch.
@tengomucho tengomucho marked this pull request as ready for review September 9, 2024 12:56
@@ -34,10 +32,10 @@ def load_llama_model_info(model_path: str) -> Any:
return model_info


def load_model_info(model_path: str) -> Any:
config = AutoConfig.from_pretrained(model_path) # For now only Llama 2 is supported
def load_model_info(config: PretrainedConfig) -> Any:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def load_model_info(config: PretrainedConfig) -> Any:
def load_model_info(config: "PretrainedConfig") -> Any:

@@ -11,19 +11,17 @@
QuantizationConfig,
)
from loguru import logger
from transformers import AutoConfig
from transformers import AutoConfig, PretrainedConfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from transformers import AutoConfig, PretrainedConfig
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from transformers import PretrainedConfig
from transformers import AutoConfig

Copy link
Member

@mfuntowicz mfuntowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@tengomucho tengomucho merged commit b25e973 into main Sep 10, 2024
4 checks passed
@tengomucho tengomucho deleted the llama3-on-jetstream-pt-tgi branch September 10, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants