Felladrin/onnx-TinyMistral-248M
By Felladrin · ↓ 7 · ♥ 7 · Updated 2024-01-07
What's in this repo
This page lists the files in Felladrin/onnx-TinyMistral-248M, including decoder_model_merged.onnx, decoder_model_merged_quantized.onnx.
- 2 ONNX models (.onnx files)
- 12 files, including 7 .json, 2 .onnx, 1 .md, 1 .model
- Last updated 2024-01-07
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/decoder_model_merged.onnx | — | Download |
| onnx/decoder_model_merged_quantized.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
INT8 ONNX version of Locutusque/TinyMistral-248M to use with Transformers.js.
Example usage
Pipeline API
import { pipeline } from '@xenova/transformers';
const generator = await pipeline('text-generation', 'Felladrin/onnx-int8-TinyMistral-248M');
const output = await generator('Once upon a time,', { add_special_tokens: true, max_new_tokens: 60, repetition_penalty: 1.2});
console.log(output);
// 'Once upon a time, the world was in turmoil. The United States had been on an unprecedented hiatus since 1970 and it seemed that America’s role as a global powerhouse would be at risk if we were to continue with our current political system.\n\nThe US has become'
Auto Classes
import { AutoModelForCausalLM, AutoTokenizer } from '@xenova/transformers';
const model_path = 'Felladrin/onnx-int8-TinyMistral-248M';
const model = await AutoModelForCausalLM.from_pretrained(model_path);
const tokenizer = await AutoTokenizer.from_pretrained(model_path);
const prompt = 'Once upon a time,';
const { input_ids } = tokenizer(prompt);
const tokens = await model.generate(input_ids, { max_new_tokens: 60, repetition_penalty: 1.2});
console.log(tokenizer.decode(tokens[0], { skip_special_tokens: true }));
// 'Once upon a time, the world was in turmoil. The United States had been on an unprecedented hiatus since 1970 and it seemed that America’s role as a global powerhouse would be at risk if we were to continue with our current political system.\n\nThe US has become'
Model info
text-generation
transformers.js
transformers.js
onnx
mistral
text-generation
conversational
base_model:Locutusque/TinyMistral-248M
base_model:quantized:Locutusque/TinyMistral-248M
license:apache-2.0
region:us
↓ 7
♥ 7
Created: 2023-11-16
Updated: 2024-01-07
View on Hugging FaceFiles (12)
.gitattributes
README.md
added_tokens.json
config.json
generation_config.json
onnx/decoder_model_merged.onnx
ONNX
quantize_config.json
special_tokens_map.json
tokenizer.json
tokenizer.model
tokenizer_config.json