Giter Club home page Giter Club logo

ode's Introduction

ode

omniscient deterministic engine

features

This library implements:

  • a suite of experimental language models, including transformers, recurrent neural networks, state space models, and more
  • a plethora of custom, composable layer types, for use in your own models
  • custom optimizers, including AdamW, Lion, and Prodigy
  • learning rate schedulers
  • custom loss functions
  • a custom training loop, with gradient checkpointing (broken), L2-normalized gradient clipping
  • custom tokenizers, including support for all Huggingface Tokenizers models
  • dataset management via generator functions and iterable sampling strategies
  • support for one-label, multi-label, one-hot and integer-encoded datasets
  • a number of text-decoding strategies, including greedy (argmax), temperature, top-k, top-p, and Mirostat sampling
  • object-oriented, extensible design
  • tons more

usage

See cli.js for complete usage.

CLI Example:

node cli.js \
  --version 6 \
  --batchSize 2 \
  --gradientAccumulationSteps 8 \
  --sampleLength 256 \
  --generateEvery 512 \
  --predictLength 512 \
  --saveEvery 250 \
  --action train

Library Example:

import ODE from 'ode'

const net = await ODE({
    backend: 'webgl', // available backends: ['tensorflow', 'webgl', 'webgpu']
    version: 6
})

await net.init()

const dataSampler = net.ode.samplers.CosmopediaSampler()
await net.train(dataSampler, {
    batchSize: 1,
    gradientAccumulationSteps: 64,
    sampleLength: 256,
    saveEvery: 100
})

const output = await net.generate({
    prompt: 'Once upon a time, ',
    doSample: true,
    temperature: 0.7,
    maxNewTokens: 64,
    repetitionPenalty: 1.2
})

console.log(output)

todo

  • [] in cross attention, queries are generated from one embedding, and keys/values from another (A "peer" is all you need)
  • [] explore model parallelism, sharding, peer-to-peer capabilities
  • [] reinforcement learning, to teach the models "when" to respond, and when to remain quiet
  • [] cross-modal models (i.e. a picture of text predicts a character)

ode's People

Contributors

vectorrent avatar

Stargazers

Naolast avatar  avatar  avatar Cerx avatar Todd Pressley avatar Mark Nadal avatar

ode's Issues

Enhance Tokenmonster

We should update Tokenmonster, to do the following:

  1. When running in Node.js (i.e. dev), tokenizers should be cached locally.
  2. Locally-downloaded tokenizers should be committed to source code.
  3. Tokenmonster should be configured to include a tokenizer within the build, so we can load it directly from The Source (instead of Huggingface).

Integrate a validation set

The challenge is with how to split the data, when the vast majority of it is being sampled stochastically, today.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.