Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer utilise l’IA pour améliorer la qualité des vidéos, restituer les détails, réduire le flou et agrandir
If you haven't already, you can install the
Transformers.js
JavaScript library from
NPM
using:
npm i @xenova/transformers
Example:
Text generation with
Xenova/TinyLlama-1.1B-Chat-v1.0
.
import { pipeline } from'@xenova/transformers';
// Create a text-generation pipelineconst generator = awaitpipeline('text-generation', 'Xenova/TinyLlama-1.1B-Chat-v1.0');
// Define the list of messagesconst messages = [
{ "role": "system", "content": "You are a friendly assistant." },
{ "role": "user", "content": "Explain thermodynamics in simple terms." },
]
// Construct the promptconst prompt = generator.tokenizer.apply_chat_template(messages, {
tokenize: false, add_generation_prompt: true,
});
// Generate a responseconst result = awaitgenerator(prompt, {
max_new_tokens: 256,
temperature: 0.7,
do_sample: true,
top_k: 50,
});
console.log(result);
// [// {// generated_text: '<|system|>\n' +// 'You are a friendly assistant.\n' +// '<|user|>\n' +// 'Explain thermodynamics in simple terms.\n' +// '<|assistant|>\n' +// 'Thermodynamics is a branch of physics that deals with the study of heat and its transfer, including the relationship between matter and energy, the concept of chemical equilibrium, and the effects of temperature on chemical and physical processes. In thermodynamics, the properties of matter (such as heat capacity, specific heat, and entropy) are considered and their behavior is studied in relation to the temperature.\n\n' +// 'Here are some simple steps to explain thermodynamics in simple terms:\n\n' +// '1. Energy: Energy is the ability to do work. It is the ability to transfer heat or do other thermodynamic processes. Some common forms of energy are heat, light, electricity, and chemical energy.\n\n' +// '2. Heat: Heat is a form of energy that can be transferred from one place to another. It is the ability to induce a change in the temperature of a body or system.\n\n' +// '3. Heat capacity: Heat capacity is the amount of heat required to raise the temperature of a system by 1 degree Kelvin (K). It is a measure of the ability of a material to absorb and dissipate thermal energy.\n\n' +// '4. Specific heat: Specific heat is the heat required to raise the'// }// ]
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
).
Runs of Xenova TinyLlama-1.1B-Chat-v1.0 on huggingface.co
1.6K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
-26
30-day runs
More Information About TinyLlama-1.1B-Chat-v1.0 huggingface.co Model
TinyLlama-1.1B-Chat-v1.0 huggingface.co
TinyLlama-1.1B-Chat-v1.0 huggingface.co is an AI model on huggingface.co that provides TinyLlama-1.1B-Chat-v1.0's model effect (), which can be used instantly with this Xenova TinyLlama-1.1B-Chat-v1.0 model. huggingface.co supports a free trial of the TinyLlama-1.1B-Chat-v1.0 model, and also provides paid use of the TinyLlama-1.1B-Chat-v1.0. Support call TinyLlama-1.1B-Chat-v1.0 model through api, including Node.js, Python, http.
TinyLlama-1.1B-Chat-v1.0 huggingface.co is an online trial and call api platform, which integrates TinyLlama-1.1B-Chat-v1.0's modeling effects, including api services, and provides a free online trial of TinyLlama-1.1B-Chat-v1.0, you can try TinyLlama-1.1B-Chat-v1.0 online for free by clicking the link below.
Xenova TinyLlama-1.1B-Chat-v1.0 online free url in huggingface.co:
TinyLlama-1.1B-Chat-v1.0 is an open source model from GitHub that offers a free installation service, and any user can find TinyLlama-1.1B-Chat-v1.0 on GitHub to install. At the same time, huggingface.co provides the effect of TinyLlama-1.1B-Chat-v1.0 install, users can directly use TinyLlama-1.1B-Chat-v1.0 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
TinyLlama-1.1B-Chat-v1.0 install url in huggingface.co: