[R11 Proprosal] - Posthuman Codex

Project Name: Posthuman Codex

Github : https://github.com/PosthumanMarket/Posthuman.py/tree/v2

Twitter : https://twitter.com/PosthumanNetwo1

In one sentence: Posthuman provides AI-as-a-service using Ocean C2D architecture to deliver private & verifiable AI results to users.

Proposal Wallet Address:

0x21e06646433954aabace8e3d93d502e423249299

Grant Amount: 18,000 USD

Grant Category: Build / improve applications or integrations to Ocean

Project Summary

Posthuman AI Market will make available AI-models-as-a-service using the Ocean Protocol stack. Model Curators pool funds to datatokens of useful models, and Model Consumers purchase inference and evaluation on the models they find most useful.

Posthuman’s decentralised architecture achieves many goals that are impossible with centralised AI providers:

  • Decentralised Model Ownership: Model is owned by the community holders of the datatoken - allows anyone to invest in and profit from useful AI models.
  • Permissionless Development: Fine-tuning advanced AI models is permissioned on Web2 APIs like OpenAI, and the fine-tuned models are owned by OpenAI and can be unilaterally deleted. In contrast, anyone can fine-tune one of the Posthuman Models on their own data, and the resulting model will also be community-owned.
  • Censorship-Resistant Access : Access to AI is fast becoming a basic necessity for a productive life, however such access can easily be censored by centralised providers. With a decentralised alternative, any holder of crypto is guranteed to be treated equally by the protocol.

Additional benefits include-

  • Verifiable Training and Inference: The end user can know for sure which model served a particular inference request
  • Zero-Knowledge fine-tuning: The marketplace controls the models, ensuring each person who contributed to the datatoken Pool is rewarded fairly, as all value created by these models remains on-chain and cannot be ‘leaked’.

Proposal - Posthuman Codex

We’re excited to undertake a much more ambitious and powerful project - replicating an open and permissionless version of OpenAI Codex, the AI coding assistant. Codex lets users write entire functions, scripts, interfaces and even games using only a few lines of natural language input, and no code. It is an incredibly useful tool in the hands of coders, however access to the models is currently walled-garden and heavily permissioned, keeping it from truly taking off as an everyday coding tool.

The reason why it is impossible to compete with Open AI codex as a web2, API startup can be summed up in a word - trust. Nobody would trust an unknown person providing an API as serving the right model reliably. Posthuman AI on Ocean solves that problem - using the classic web3 ‘don’t trust, verify’ paradigm. Users need not trust PH, the model DID etc. is stored on the blockchain and cannot be tampered with. If users run an evaluation script just once, they can be certain that the model will always give that performance.

Training Spec

We plan on using a large portion of the grant ($10k) towards GPU/TPU costs of training our AI model. The models will exclusively be made available on Posthuman AI Marketplace, channelling all usage revenue to Ocean as Data-Token Consumption value.

We will train starting at this model checkpoint:

PH-Codex-Jumbo - 6B parameters - this model size has shown a great ability to write code, comparable to the much larger OpenAI GPT-3. This model will be made available on custom hardware (Our fork of Market) as soon as it is ready. Meanwhile, training loss, metadata, and examples of inference will be shared.

Based on community feedback, we’re dividing our requested amount over 2 grants (R11 & R12). Models will be trained to the extent possible with this grant; further training/fine-tuning can be funded by future grants.

Future plans include the training of much larger AI models, of the size of GPT-3 and beyond. For this grant we will also be laying the foundation for such future models, by upgrading our codebase to the zero-infinity library - https://www.microsoft.com/en-us/research/blog/zero-infinity-and-deepspeed-unlocking-unprecedented-model-scale-for-deep-learning-training/

We have also secured access to the technical preview of Github Co-Pilot* We will be using that as a performance benchmark to measure against the models that we train.

*GitHub Copilot is an AI coding assistant based on GPT-3 like architecture/similar to OpenAI Codex. Currently in invite-only beta stage. More - https://copilot.github.com

Forking Ocean Market

We have been working in parallel to build our own fork of Ocean Market (Posthuman AI market), with specific compute tailored to running high performance AI models with low latency (NVIDIA A100 cluster, pytorch and CUDA pre installed etc.) We have made progress and believe we should have our own fork live following this grant.

PHC-J will be published on our fork of the marketplace with GPU-based compute-to-data as soon as it is ready (~1mo). The models will be trained on the Codenet dataset- https://research.ibm.com/blog/codenet-ai-for-code

We’ve picked the pretrained GPT-J checkpoint in particular because it has displayed great performance on writing code - very similar to the much larger GPT-3 model on which OpenAI Codex is based. For code samples written by untrained GPT-J see: https://minimaxir.com/2021/06/gpt-j-6b/

We will also be updating our NLP library to the DeepSpeed Zero library which supports models upto 32 Trillion Parameters, in preparation for future model launches with much higher parameterisation.

ROI Calculation

This is a proposal specific ROI calculation. Our general (1.2) ROI calculation for Posthuman AI models as a whole still applies, and can be found here.

Codex-like software is poised to shake up the multi-trillion software developer market. Even conservatively, estimates of Codex/Co-pilot revenues based on initial interest, range from hundreds of millions to over a Billion.

A bottom-up calculation goes as follows - OpenAI charges roughly $1 per 10 lines for their most advanced AI model (GPT-3 da-vinci), based on which Codex is built. Even if they don’t increase the rate any further, this adds up really fast.

If 1000 coders use PH-Codex to write 100k lines of code a year (~300 lines of code/day), that’s $10 million in revenues. The models will exclusively be made available on Ocean/PH Marketplace, channelling all usage revenue to Ocean as Data-Token Consumption value.

Since training complex AI models is a black box task with a fair bit of uncertainty, we will conservatively estimate our chance of success at 50% with present funding.

A generalised/full ROI calculation would therefore be as follows:

Buck: $68,000
Bang: $2.5m + $5m
Probability: 50%
ROI: $3.75m/68k = 55

Deliverables

[] Train PH-Codex-J based on the spec defined above. Share test loss, writing samples and other results.

[] Prepare and launch fork of Ocean Market customised for AI models (Posthuman AI Marketplace).

[] Publish PH-Codex-J as the first model on the Posthuman AI Marketplace.

[] Upgrade codebase to deep speed zero-infinity library

[] Prepare bounties for a Hackathon using PH-Codex-J model

Team members

Dhruv Mehrotra

Role: Core developer - Python, Solidity

Relevant Credentials:

GitHub: https://github.com/dhruvluci

LinkedIn: https://www.linkedin.com/in/dhruv-mehrotra-luci/

Gitcoin: https://gitcoin.co/dhruvluci

Background/Experience:

  • Co-founder/CEO, LUCI [AI information retrieval for enterprise]

  • Patented first Legal AI to clear the Bar Exam [2019].

  • Invented Bayesian Answer Encoding, state-of-the art in Open Domain QA in 2019.

  • Multiple hackathon winner and leading weekly earner, Gitcoin.

Hetal Kenaudekar

Role : Core developer - Solidity, JS, Frontend

GitHub : https://github.com/Aranyani01

LinkedIn : https://www.linkedin.com/in/hetal-kenaudekar-796715178/

Background/Experience:

  • Co-founder/COO, LUCI [AI information retrieval for enterprise]

  • Interface design, community engagement for various DeFi teams.

  • Solidity/JS/Frontend dev since early 2020, winner of multiple hackathons and grants.

External Links -