Edit model card

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...
Downloads last month
0
Inference Examples
Inference API (serverless) does not yet support transformers.js models for this pipeline type.

Finetuned from