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

Integrate support for Transformers models #887

Merged
merged 8 commits into from
Nov 22, 2024
Merged

Integrate support for Transformers models #887

merged 8 commits into from
Nov 22, 2024

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Nov 22, 2024

Add support for the Hugging Face Transformers model, enabling text generation capabilities within the application. This includes necessary imports, model handling, and configuration updates.


Pull Request Description

Summary of Changes

  • 🚀 Introduced Hugging Face Transformers.js: Added experimental support for Hugging Face Transformers.js, enabling on-device model execution. This includes new documentation and configuration options.
  • 📦 Dependencies Update: Added @huggingface/transformers as an optional dependency in both cli and core packages to support the new Transformers feature.
  • 🔧 Code Refactoring: Removed unused code related to encoding messages for Llama, streamlining the chat processing logic.
  • 🌐 Model Provider Enhancements: Integrated a new model provider transformers into the system, including constants and model resolution logic.
  • 🆕 New Sample Script: Added a sample script transformers.genai.mjs to demonstrate the usage of the new Transformers feature.
  • 🛠️ Build Script Adjustments: Updated build scripts to include @huggingface/transformers as an external dependency where necessary.

Notes

  • The Hugging Face Transformers.js provider is experimental and may not work with all models.

generated by prd

@pelikhan pelikhan merged commit fb0054d into main Nov 22, 2024
6 of 8 checks passed
@pelikhan pelikhan deleted the transformers branch November 22, 2024 13:59
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.

1 participant