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

Support local and custom models #246

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

leo4life2
Copy link

@leo4life2 leo4life2 commented Sep 30, 2024

Issue #165

Done:

  • Interface changes for adding a model with HuggingFace model name
    • UI logic: put HuggingFace model name in "add model" text area (e.g. owner/modelName), click Add, select the model name in the dropdown, and start chatting.
  • Loading & running model from HuggingFace

WIP:

  • stream tokenizer decode minor bug
  • model name persisting (will probably use localSession)
  • support local models

@leo4life2 leo4life2 closed this Sep 30, 2024
@leo4life2 leo4life2 reopened this Sep 30, 2024
shard = model_base_shards[chat_request.model].get(self.inference_engine_classname, None)
else:
# HF models
hf_model_url = f"https://huggingface.co/{chat_request.model}"
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to use HF_ENDPOINT environment variable which was just added

@AlexCheema
Copy link
Contributor

This looks great.

What we'd really need here to get this merged is automatically sharding the model. The PyTorch implementation here does this automatically, you can see how they do it #139
That way any language model can be supported without having to explicitly write a sharded model implementation.

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.

2 participants