Skip to content

Feature/text generation hf models#711

Merged
ArshaanNazir merged 15 commits intorelease/1.4.0from
feature/text-generation-hf-models
Aug 27, 2023
Merged

Feature/text generation hf models#711
ArshaanNazir merged 15 commits intorelease/1.4.0from
feature/text-generation-hf-models

Conversation

@alytarik
Copy link
Copy Markdown
Contributor

@alytarik alytarik commented Aug 17, 2023

Description

This PR is intended to add the capability to locally deploy and assess text generation models sourced from the Hugging Face model hub. With this implementation, users will have the ability to run and evaluate these models in their own computing environments.


Fixes #667

Type of change

  • New feature (non-breaking change which adds functionality)

Usage

You can set the hub parameter to huggingface and choose any model from HF model hub.
In the example below, we load the opt-1.3b model from facebook to test it's capabilities for summarization task.

 harness = Harness(
    task="summarization",
    model={"model": "facebook/opt-1.3b", "hub":"huggingface"},
    data={...},
    config={
     ...
    })

Example Notebook:
https://colab.research.google.com/github/JohnSnowLabs/langtest/blob/feature/text-generation-hf-models/demo/tutorials/llm_notebooks/HuggingFaceHub_QA_Summarization_Testing_Notebook.ipynb

Checklist:

  • I've added Google style docstrings to my code.
  • I've used pydantic for typing when/where necessary.
  • I have linted my code
  • I have added tests to cover my changes.

Screenshots (if appropriate):

image
imageimage

@alytarik alytarik linked an issue Aug 17, 2023 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@chakravarthik27 chakravarthik27 left a comment

Choose a reason for hiding this comment

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

@alytarik
LGTM

@ArshaanNazir ArshaanNazir changed the base branch from release/1.3.0 to release/1.4.0 August 27, 2023 05:15
Copy link
Copy Markdown
Contributor

@ArshaanNazir ArshaanNazir left a comment

Choose a reason for hiding this comment

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

It looks fine. Kindly add notebook link in PR description as well. @alytarik

@ArshaanNazir ArshaanNazir merged commit a054942 into release/1.4.0 Aug 27, 2023
@ArshaanNazir ArshaanNazir deleted the feature/text-generation-hf-models branch September 6, 2023 04:56
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.

Add text generation models support for HF

3 participants