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

[xh]Enable hugging face client to use code generation specific model #4259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matrixstone
Copy link
Collaborator

Description

When use description to generate block code, one step may run into is to generated customized code based on description.
In existing hugging face client, it uses default language model to generate the customized code. However, there are code generation specific model which can perform better than general language model for that task.

This PR enables this capability by using a code generation model for that specific task.

  • It adds config to enable this feature and provides a code_gen_api
  • In the inference function, it adds the inference type and for code generation type, it calls a specific function to call the code_gen_api to fulfill the task

How Has This Been Tested?

Tested with local command and Mage UI
2

Checklist

  • The PR is tagged with proper labels (bug, enhancement, feature, documentation)
  • I have performed a self-review of my own code
  • I have added unit tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • If new documentation has been added, relative paths have been added to the appropriate section of docs/mint.json

cc:
@dy46

@matrixstone matrixstone added the feature New feature or request label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant