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

together-ai

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

together-ai

A Node SDK for Together.ai.

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.5K
increased by58.46%
Maintainers
1
Weekly downloads
 
Created
Source

Together.ai Node SDK

An npm library to run open source LLMs through Together.ai.

Current version


Installation

npm i together-ai

Usage

Add open source LLMs to your apps in a few lines of code. Simply create a new Together.ai client, specify your preferred AI model with inputs, and get back a result.

import Together from 'together-ai';

const together = new Together({
  auth: process.env.TOGETHER_API_KEY,
});

const model = 'mistralai/Mistral-7B-Instruct-v0.1';

const result = await together.inference(model, {
  prompt: 'Suggest some fun family activities for the new year',
  max_tokens: 300,
});

This is a list of popular models that are supported.

  • Mistral-7B (mistralai/Mistral-7B-Instruct-v0.1)
  • Llama-2 70B (togethercomputer/llama-2-70b-chat)
  • Llama-2 13B (togethercomputer/llama-2-13b-chat)
  • RedPajama 7B (togethercomputer/RedPajama-INCITE-7B-Chat)
  • OpenOrca Mistral (Open-Orca/Mistral-7B-OpenOrca)
  • Alpaca 7B (togethercomputer/alpaca-7b)

How it works

This library uses the Together Inference Engine, the world's fastest inference stack for open source LLMs. It calls the Together.ai Inference API, specifically their serverless endpoints product, to enable you to use OSS LLMs quickly and effeciently.

Keywords

FAQs

Package last updated on 07 Dec 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