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

using gemma2 2B model for js llm inference #477

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

Conversation

iamrajhans
Copy link

@iamrajhans iamrajhans commented Nov 26, 2024

Description

Updating the model to use gemma2 for js llm inference

Fixes # (issue)

Checklist

Please ensure the following items are complete before submitting a pull request:

  • My code follows the code style of the project.
  • I have updated the documentation (if applicable).
  • I have added tests to cover my changes.

Type of Change

Please check the relevant option below:

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update (non-breaking change which updates documentation)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Screenshots

If applicable, please add screenshots to help explain your changes.

Additional Notes

Add any additional information or context about the pull request here.

@iamrajhans
Copy link
Author

hi @schmidt-sebastian @PaulTR ,

could you please review the PR and suggest if any changes required

thanks !

@@ -13,7 +13,7 @@ This web sample demonstrates how to use the LLM Inference API to run common text

Follow the following instructions to run the sample on your device:
1. Make a folder for the task, named as `llm_task`, and copy the [index.html](https://github.com/googlesamples/mediapipe/blob/main/examples/llm_inference/js/index.html) and [index.js](https://github.com/googlesamples/mediapipe/blob/main/examples/llm_inference/js/index.js) files into your `llm_task` folder.
2. Download [Gemma 2B](https://www.kaggle.com/models/google/gemma/frameworks/tfLite/variations/gemma-2b-it-gpu-int4) (TensorFlow Lite 2b-it-gpu-int4 or 2b-it-gpu-int8) or convert an external LLM (Phi-2, Falcon, or StableLM) following the [guide](https://developers.google.com/mediapipe/solutions/genai/llm_inference/web_js#convert-model) (only gpu backend is currently supported), into the `llm_task` folder.
2. Download [Gemma2 2B](https://www.kaggle.com/models/google/gemma-2/tfLite/gemma2-2b-it-gpu-int8) (TensorFlow Lite 2b-it-gpu-int8 or 2b-it-cpu-int8) or convert an external LLM (Phi-2, Falcon, or StableLM) following the [guide](https://developers.google.com/mediapipe/solutions/genai/llm_inference/web_js#convert-model) (only gpu backend is currently supported), into the `llm_task` folder.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't support CPU models on Web.

Copy link
Collaborator

Choose a reason for hiding this comment

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

(We might also leave both models up until we have an int4 model of Gemma 2)

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