npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@soteen/bela

v0.0.4-dev

Published

This is machine learning using BELA.

Readme

Banner

BELA is an AI architecture that represents text using binary, leverages entropy for learning, and two-way prediction to create response.

BELA itself stands for Binary Entropy Learning Architecture.

Tutorials

If you want to learn how to install and use BELA, you can follow the tutorial we provide.

Installation

You can install BELA using npm with this command.

npm install @soteen/bela

Next steps after installation

Here's a quick setup to start training your own AI model with BELA.

  1. Creating a configuration:

    You need a configuration to configure the model you want to create.

    {
      "parameter": {
        "epochs": 5, // Number of training iterations
        "learningRate": 0.05, // Learning rate for optimization
        "nGramOrder": 3, // Context window size for text processing
        "layers": [64, 32, 16] // Neural network layer sizes
      },
      "path": {
        "root": "./", // Base directory
        "model": "./models/", // Model storage path
        "backup": "./backup/" // Backup directory
      },
      "autoIncrement": true, // Automatic upgrade
      "autoDelete": true, // Delete old versions automatically
      "autoDeleteMax": 2 // Number of versions stored, oldest will be deleted
    }
  2. Creating a dataset:

    Before proceeding to the next step, you need to create a dataset as follows.

    [
      { "input": "Hey, how are you?", "output": "I'm fine, thank you?"},
      { "input": "Tell me about the story", "output": "Sure! I'll tell you about the story" }
    ]
  3. Use the code examples:
    After installing, creating configurations, and creating datasets. You can run the following codes.

    3.1. Import @soteen/bela to the project:

    import { BELA } from "@soteen/bela";

    3.2. Initialize BELA with the configuration:

    const model = new BELA(config);

    3.3. Train the model with the dataset:

    model.train(dataset);

    3.4. Save the trained model:

    /** No auto-increment */
    model.save("model.belamodel", {
      password: password
    });
       
    /** With auto-increment */
    model.save("model", {
      password: password
    });

    3.5. Load the trained model:

    /** No auto-increment */
    model.load("model.belamodel", {
      password: password
    });
       
    /** With auto-increment */
    model.load("model", {
      password: password
    });

    3.6. Move model to new/other file:

    /** No auto-increment */
    model.move("old-model.belamodel", {
      password: oldPassword
    },
    "new-model.belamodel", {
      password: newPassword
    });
       
    /** With auto-increment */
    model.move("old-model", {
      password: oldPassword
    },
    "new-model", {
      password: newPassword
    });

    3.7. Read the contents of the .belamodel file:

    /** No auto-increment */
    console.log(model.read("model.belamodel", {
      password: password
    }));
       
    /** With auto-increment */
    console.log(model.read("model", {
      password: password
    }));

    3.8. Make a prediction:

    const predict = model.predict("Say this is example code.", {
      maxLength: 12,
      maxTest: 5,
      logTest: true
    });
       
    console.log(predict);

[!CAUTION] We recommend that you store your configuration in a JSON file and your model password in a .env file.

Installation Performance

From version to version, BELA has installation differences that we can see in the following table. | Version | Size | Performance | Optimizations performed | |------------|---------|-------------|-------------------------| | v0.0.4-dev | 64.62kB | 5s | Build and minify using esbuild | | v0.0.3-dev | 69.25kB | 4-8s | Deleting .js.map files | | v0.0.2-dev | 83.09kB | 4-8s | Nothing | | v0.0.1-dev | 83.16kB | 4-8s | Nothing |

This data is obtained by extracting the .tgz file from each version, after which its size is obtained through the process of checking the size of its folder. This data does not include the dependencies.

Contribute

If you haven't contributed yet, you should read how to contribute to this project.

Roadmap

This project has several roadmaps that we have achieved and have not achieved.

  • [x] Compatible with CommonJS and ES Modules.
  • [x] Introducing the move() feature.
  • [x] Introducing the read() feature.
  • [x] Introducing the fineTune() feature.
  • [x] Introducing the security of the .belamodel feature.
    And others...