akash-network / awesome-akash

Awesome List of Akash Deployment Examples
Apache License 2.0
308 stars 223 forks source link

Deployment of BERT and XLM-RoBERTa AI Models on Akash GPU Testnet #407

Closed clydedevv closed 1 year ago

clydedevv commented 1 year ago

Summary

This PR includes the necessary configuration files and instructions for deploying the BERT, XLM-RoBERTa, and BERT Sentiment Analysis AI models on the Akash GPU Testnet. These models are capable of performing masked language modeling tasks and sentiment analysis, which can be useful for various NLP applications.

Details

The following files are included for each model:

  1. Dockerfile: This file is used to build the Docker image for the application. It sets up an environment with Python and all the necessary libraries to run the application.

  2. requirements.txt: This file lists the Python packages that need to be installed in the Docker image. This includes Flask for the web application and the Transformers library for the AI models.

  3. app.py: This is the main application file. It creates a Flask web application that uses the AI model to perform masked language modeling tasks.

  4. deploy.yaml: This file defines the Akash deployment configuration for the application. It specifies the resources needed to run the application and the Docker image to use.

  5. README.md: This file provides instructions on how to build and deploy the application, as well as how to use it once it's deployed.

  6. templates/index.html: This file provides a simple web interface for interacting with the AI model.

The models can be interacted with via a web interface or a REST API. The web interface provides a simple form where users can enter a sentence with a masked word (represented by <mask>), and the model will predict the masked word. The REST API provides a /predict endpoint that accepts POST requests with a JSON payload containing the sentence to predict.

Deployment

The models have been successfully deployed and tested on the Akash GPU Testnet. Screen recordings of successful interactions with the deployed models are in the README in their respective folders.

Future Work

These models can be further fine-tuned and used for various NLP tasks such as sentiment analysis, text classification, and more. They can also be integrated with other services and applications deployed on the Akash network.

Dimokus88 commented 1 year ago

Great @clydedevv , modify the root README.md ( https://github.com/akash-network/awesome-akash/blob/master/README.md ) of the awesome-akash repository to include a link to your deployment and you're ready to merge.

clydedevv commented 1 year ago

@Dimokus88 hey man I've made all the updates, fixed the Bert UI so it actually works now, added links to the original research repo of Facebook and Google, and updated the head README. Should be good

napelvs commented 1 year ago

@clydedevv - Could you make sure to resolve the conflicts?

@Dimokus88 - PR would be ready to merge after the conflict is resolved.

clydedevv commented 1 year ago

@Dimokus88 @napelvs I think I resolved the conlfict in the README. let me know if anything else needs to get done

Dimokus88 commented 1 year ago

Ready to merge @brewsterdrinkwater