Felladrin/onnx-Sheared-Pythia-160m-Platypus
By Felladrin · ↓ 7 · ♥ 0 · Updated 2023-11-25
What's in this repo
This page lists the files in Felladrin/onnx-Sheared-Pythia-160m-Platypus, including decoder_model_merged.onnx, decoder_model_merged_quantized.onnx.
- 2 ONNX models (.onnx files)
- 10 files, including 6 .json, 2 .onnx, 1 .md
- Last updated 2023-11-25
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 Felladrin/Sheared-Pythia-160m-Platypus to use with Transformers.js.
Example usage
Pipeline API
import { pipeline } from '@xenova/transformers';
const generator = await pipeline('text-generation', 'Felladrin/onnx-Sheared-Pythia-160m-Platypus');
const output = await generator('### User:\nTell me all you know about the Earth.\n### Assistant:', { add_special_tokens: true, max_new_tokens: 64, repetition_penalty: 1.08, do_sample: true, temperature: 0.2 });
console.log(output);
// The Earth is a fascinating and mysterious land with an unusual atmosphere that attracts many people around it...
Auto Classes
import { AutoModelForCausalLM, AutoTokenizer } from '@xenova/transformers';
const model_path = 'Felladrin/onnx-Sheared-Pythia-160m-Platypus';
const model = await AutoModelForCausalLM.from_pretrained(model_path);
const tokenizer = await AutoTokenizer.from_pretrained(model_path);
const prompt = '### User:\nTell me all you know about the Earth.\n### Assistant:';
const { input_ids } = tokenizer(prompt);
const tokens = await model.generate(input_ids, { max_new_tokens: 64, repetition_penalty: 1.08, do_sample: true, temperature: 0.2 });
console.log(tokenizer.decode(tokens[0], { skip_special_tokens: true }));
// The Earth is a fascinating and mysterious land with an unusual atmosphere that attracts many people around it...
Model info
text-generation
transformers.js
transformers.js
onnx
gpt_neox
text-generation
base_model:Felladrin/Sheared-Pythia-160m-Platypus
base_model:quantized:Felladrin/Sheared-Pythia-160m-Platypus
license:apache-2.0
region:us
↓ 7
♥ 0
Created: 2023-11-24
Updated: 2023-11-25
View on Hugging FaceFiles (10)
.gitattributes
README.md
config.json
generation_config.json
onnx/decoder_model_merged.onnx
ONNX
quantize_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json