Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@energetic-ai/core

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@energetic-ai/core

EnergeticAI is TensorFlow.js, optimized for serverless environments, with fast cold-start, small module size, and great usability.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

EnergeticAI

Run open-source AI in serverless functions, up to 67x faster. Compatible with Tensorflow.js.

EnergeticAI Core

EnergeticAI is a distribution of TensorFlow.js optimized for serverless functions:

  • small module size (~3 MB vs. 146 MB - 513 MB for stock TensorFlow.js)
  • fast cold-start inference (~50 ms vs. 2000+ ms for stock TensorFlow.js)
  • incredible ease-of-use (pre-trained models for common cases)

It's intended to be a condensed replacement for TensorFlow.js, so you can use it with much existing code and models.

Install

EnergeticAI is available on NPM.

Install this core package, along with any model libraries you want to use (e.g. embeddings):

npm install @energetic-ai/core @energetic-ai/embeddings @energetic-ai/model-embeddings-en

You can see a full list of packages below.

Usage

Here's an example of using the embeddings model:

import { initModel, distance } from "@energetic-ai/embeddings";
import { modelSource } from "@energetic-ai/model-embeddings-en";
(async () => {
  const model = await initModel(modelSource);
  const embeddings = await model.embed(["hello", "world"]);
  console.log(distance(embeddings[0], embeddings[1])));
})();

Examples

See the examples directory for examples.

Development

This repository uses Lerna to manage packages, and Vitest to run tests.

License

Apache 2.0, except for dependencies.

Acknowledgements

This project is derived from TensorFlow.js which is also Apache 2.0 licensed.

Keywords

FAQs

Package last updated on 11 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc