Downloads · 30 days
21
5% of all-time downloads
Felladrin/onnx-bloomz-560m-sft-chat
onnx-bloomz-560m-sft-chat is a text generation model from Felladrin. Use it when you need the model to write or continue text. It is set up for transformers.js. The card lists the license as bigscience-bloom-rail-1.0.
INT8 ONNX version of cmarkea/bloomz-560m-sft-chat to use with Transformers.js.
Downloads · 30 days
21
5% of all-time downloads
All-time downloads
410
Public
Repo size
2.8 GB
Likes
1
Public
Click a slice to open those files.
.onnx_data2.2 GB · 80%
From the Hugging Face model README
INT8 ONNX version of cmarkea/bloomz-560m-sft-chat to use with Transformers.js.
import { pipeline } from '@xenova/transformers';
const generator = await pipeline('text-generation', 'Felladrin/onnx-bloomz-560m-sft-chat');
const output = await generator('</s>What is the first world war?<s>', { add_special_tokens: true, max_new_tokens: 128, repetition_penalty: 1.2});
console.log(output); // The first world war was a conflict between the United States and the Soviet Union. The conflict began in World War II and lasted until the end of World War III.
import { AutoModelForCausalLM, AutoTokenizer } from '@xenova/transformers';
const model_path = 'Felladrin/onnx-bloomz-560m-sft-chat';
const model = await AutoModelForCausalLM.from_pretrained(model_path);
const tokenizer = await AutoTokenizer.from_pretrained(model_path);
const prompt = '</s>What is the first world war?<s>';
const { input_ids } = tokenizer(prompt);
const tokens = await model.generate(input_ids, { max_new_tokens: 128, repetition_penalty: 1.2});
console.log(tokenizer.decode(tokens[0], { skip_special_tokens: true }));
// The first world war was a conflict between the United States and the Soviet Union. The conflict began in World War II and lasted until the end of World War III.