Felladrin/onnx-llama2_xs_460M_experimental_evol_instruct
By Felladrin · ↓ 5 · ♥ 0 · Updated 2023-11-19
What's in this repo
This page lists the files in Felladrin/onnx-llama2_xs_460M_experimental_evol_instruct, 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 .txt
- Last updated 2023-11-19
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/llama2_xs_460M_experimental_evol_instruct to use with Transformers.js.
Example usage
Pipeline API
import { pipeline } from '@xenova/transformers';
const generator = await pipeline('text-generation', 'Felladrin/onnx-int8-llama2_xs_460M_experimental_evol_instruct');
const output = await generator('Once upon a time,', { add_special_tokens: true, max_new_tokens: 60, repetition_penalty: 1.2});
console.log(output);
Auto Classes
import { AutoModelForCausalLM, AutoTokenizer } from '@xenova/transformers';
const model_path = 'Felladrin/onnx-int8-llama2_xs_460M_experimental_evol_instruct';
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 }));
Model info
text-generation
transformers.js
transformers.js
onnx
llama
text-generation
base_model:Felladrin/llama2_xs_460M_experimental_evol_instruct
base_model:quantized:Felladrin/llama2_xs_460M_experimental_evol_instruct
region:us
↓ 5
♥ 0
Created: 2023-11-19
Updated: 2023-11-19
View on Hugging FaceFiles (12)
.gitattributes
README.md
config.json
generation_config.json
merges.txt
onnx/decoder_model_merged.onnx
ONNX
quantize_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json