Skip to content

self-host Translating AI model #3

@LuckiPhoenix

Description

@LuckiPhoenix

Integrate a self-hosted English-Vietnamese translation model into an Express.js app using Hugging Face’s transformers to enhance performance, reduce costs, and ensure data privacy.

Tasks:

  • Select Model: Use an appropriate Hugging Face translation model (e.g., facebook/mbart-large-50-many-to-many-mmt).

  • Setup Dependencies: Install @huggingface/transformers, torch, and node-fetch.

  • Load Model Locally: Implement logic to download and run the model.

  • Create API Endpoint: /translate for handling translation requests with source_lang and target_lang.

  • Optimize Performance: Use batching, caching, and GPU acceleration if available.

  • Error Handling & Logging: Ensure robust handling and logging mechanisms.

Acceptance Criteria:

  • Eng-Vie translation
  • fast
    Note: could have to be coded in python!

References:

Hugging Face Transformers: https://huggingface.co/docs/transformers/index

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions