BlockTrain enhances transparency and monetization in AI by embedding data ownership and revenue-sharing smart contracts on OKP4, coupled with controlled model access and insights into training data, leveraging Prolog and integrating with Akash for streamlined deployment.
Leveraging Prolog within OKP4, BlockTrain aims to exhibit clear ownership of datasets. Each dataset is associated with a distinct identity, demonstrating who owns the dataset. This transparency is a significant shift from conventional models where data ownership and origins are often opaque. It provides users with a clearer understanding of data lineage and ownership.
Dataset owners have the opportunity to monetize their datasets by charging users who wish to utilize models trained on their data. Smart contracts on OKP4 manage the revenue-sharing agreements. This ensures that payments are automated, transparent, and fair, fostering a new economic ecosystem around AI and data.
By utilizing Prolog rules on OKP4, BlockTrain governs who can access a particular AI model. Access control is managed via smart contracts, ensuring that only authorized individuals or entities can use the model. This approach secures the models and datasets against unauthorized access.
BlockTrain offers users a "look under the hood" of the models, allowing them to understand the data on which they are trained. This initiative is a step towards more transparent AI. It enables users to have better insight into model behavior and biases, which is often missing in today's consumer AI implementations.
BlockTrain is integrated with Akash, ensuring a seamless and efficient deployment process. The integration facilitates easy deployment of AI models and datasets on the decentralized cloud. Moreover, BlockTrain provides code for automated orchestration, simplifying the deployment process and reducing manual intervention.
-
TrainingApp: This directory contains Python scripts related to training models.
app.py
: A Python script for the training application.train.py
: A Python script dedicated to training processes.
-
orchestrator: Contains TypeScript source files for orchestrating various processes.
src/app.ts
: A TypeScript file for the orchestrator application.
-
src: Contains the main source files for the application.
App.tsx
: A TypeScript React file for the main application.
https://block-train-rouge.vercel.app/
% source env.development.blocktrain.sh
% make dev
Before deploying to Akash, ensure you have set up a GitHub token for access to write to the container registry. Follow the instructions provided in the GitHub documentation to generate and manage your personal access tokens.
Once you have your token, log in using the following command:
echo <TOKEN> | docker login ghcr.io -u blocktrainbuilders --password-stdin
Ensure that your Akash wallet has a balance of more than 5AKT. Follow the steps below to set up your wallet:
Use the mnemonic phrase of your wallet, Then, generate and publish the client certificate:
provider-services tx cert generate client --from blocktrain
provider-services tx cert publish client --from blocktrain
To deploy to Akash, source the environment and deploy:
source env.staging.blocktrain.sh
make deploy-staging
The image performs the following tasks:
- Processes environment variables.
- Queries OKP4 to check authentication (validates against environment variables) and retrieves data paths and training parameters.
- Retrieves the necessary data.
- Trains the AI model.
- Makes the trained model publicly available via ports 5000 and 80.