Text generation with GPT-2 in Ruby

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • onnxruntime-ruby

    Run ONNX models in Ruby

    The onnxruntime gem already contains binary files for each platform, so you don't need to install the ONNX runtime yourself. Just install the gem and it should work.

  • tokenizers-ruby

    Fast state-of-the-art tokenizers for Ruby

    The tokenizers gem is written in Rust, so installation requires Rust. If Rust isn't available, blingfire can be used instead.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • numo-narray

    Ruby/Numo::NArray - New NArray class library

    numo-narray - Ruby matrix library. Equivalent to NumPy.

  • blingfire-ruby

    High speed text tokenization for Ruby

    The tokenizers gem is written in Rust, so installation requires Rust. If Rust isn't available, blingfire can be used instead.

  • LibUI

    A portable GUI library for Ruby (by kojix2)

    The tokenizers gem is written in Rust, so installation requires Rust. If Rust isn't available, blingfire can be used instead.

  • models

    A collection of pre-trained, state-of-the-art models in the ONNX format (by onnx)

    Here we use the GPT-2 model distributed by the ONNX official. Download GPT-2-LM-HEAD from the link.

  • netron

    Visualizer for neural network, deep learning and machine learning models

    Put gpt2-lm-head-10.onnx in the same directory as the script. You can browse the content of ONNX models using NETRON.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts