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

HuggingFaceModel #21

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

HuggingFaceModel #21

wants to merge 23 commits into from

Conversation

simple-easydev
Copy link
Collaborator

Example schema:

HuggingFaceModel {
repo_id: "TheBloke/CapybaraHermes-2.5-Mistral-7B-GPTQ",
files: ["*.json", "model.safetensors"],
inference_devices: ["cpu"], // gpu, tpu, etc
quantization: "GPTQ", // GPTQ, AWQ, GGUF_Q4_0, etc
runtime: "llama.cpp", // vLLM, pytorch, etc
prompt_template: "chatml", // chatml, llama-2, gemma, etc.
}

I have established a list object named SUPPORTED_MODELS_V2 within the supported_model.py file.

If the model name exists in the SUPPORTED_MODELS_V2 list object, the system will employ the new HuggingFaceModel for downloading. Otherwise, it will resort to the old logic.

@simple-easydev simple-easydev self-assigned this Apr 11, 2024
@simple-easydev simple-easydev requested a review from jjleng April 11, 2024 15:01
@simple-easydev simple-easydev added the enhancement New feature or request label Apr 11, 2024
@simple-easydev simple-easydev linked an issue Apr 11, 2024 that may be closed by this pull request
paka/utils.py Outdated Show resolved Hide resolved
paka/kube_resources/model_group/models/abstract.py Outdated Show resolved Hide resolved
paka/kube_resources/model_group/models/abstract.py Outdated Show resolved Hide resolved
paka/kube_resources/model_group/models/abstract.py Outdated Show resolved Hide resolved
logger.info(f"SHA256 hash of the file: {sha256_value}")
return upload_id, sha256_value

def upload_fs_to_s3(
Copy link
Owner

Choose a reason for hiding this comment

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

This has a lot of duplicates with upload_to_s3. need consolidation

Copy link
Collaborator Author

@simple-easydev simple-easydev Apr 11, 2024

Choose a reason for hiding this comment

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

The upload_to_s3 method is currently unused for huggingface model, as it's specifically designed for transferring data from an HTTP stream generated by requests to an S3 bucket.

jjleng
jjleng previously approved these changes Apr 12, 2024
Copy link
Owner

@jjleng jjleng left a comment

Choose a reason for hiding this comment

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

ship it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve model abstraction and registry
2 participants