https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0 with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Text generation with Xenova/TinyLlama-1.1B-Chat-v1.0.

import { pipeline } from "@huggingface/transformers";

// Create a text generation pipeline
const generator = await pipeline(
  "text-generation",
  "Xenova/TinyLlama-1.1B-Chat-v1.0",
);

// Define the list of messages
const messages = [
  { role: "system", content: "You are a friendly assistant." },
  { role: "user", content: "Explain thermodynamics in simple terms." },
];

// Generate a response
const output = await generator(messages, { max_new_tokens: 512 });
console.log(output[0].generated_text.at(-1).content);
Example output
Thermodynamics is the branch of physics that deals with the study of energy and its transformation. It is a fundamental branch of physics that deals with the behavior of matter and its interactions with heat, work, and energy.

In simple terms, thermodynamics is the study of how energy is transferred, stored, and released in various systems. It involves the study of the following:

1. Energy: Thermodynamics deals with the concept of energy, which is the ability to do work or to cause a change in state. It includes the study of energy sources, such as heat, electricity, and chemical reactions, as well as the transfer of energy from one system to another.

2. Work: Work is the ability to do something with energy. It includes the study of the transfer of work from one system to another, as well as the study of the conversion of energy into work.

3. Energy transfer: Thermodynamics deals with the transfer of energy from one system to another. It includes the study of the transfer of energy between different types of systems, such as heat transfer between two bodies, chemical reactions, and electrical circuits.

4. Energy storage: Thermodynamics also deals with the storage of energy. It includes the study of the transfer of energy from one system to another, as well as the study of the conversion of energy into different forms.

5. Energy conversion: Thermodynamics deals with the conversion of energy from one form to another. It includes the study of the transfer of energy from one system to another, as well as the study of the conversion of energy into different forms.

In summary, thermodynamics is the study of how energy is transferred, stored, and released in various systems. It involves the study of energy sources, such as heat, electricity, and chemical reactions, as well as the transfer of energy from one system to another, the conversion of energy into different forms, and the storage of energy.

Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Downloads last month
309
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The HF Inference API does not support text-generation models for transformers.js library.

Model tree for Xenova/TinyLlama-1.1B-Chat-v1.0

Quantized
(79)
this model