Instructions to use bnicenboim/gpt2-spanish-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use bnicenboim/gpt2-spanish-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'bnicenboim/gpt2-spanish-onnx');
gpt2-spanish (ONNX)
ONNX export of DeepESP/gpt2-spanish for use in the browser with Transformers.js.
Usage with Transformers.js
import { pipeline } from '@huggingface/transformers';
const generator = await pipeline(
'text-generation',
'bnicenboim/gpt2-spanish-onnx'
);
const result = await generator('El gato estaba en', { max_new_tokens: 50 });
console.log(result[0].generated_text);
Model details
- Base model: DeepESP/gpt2-spanish
- Architecture: GPT-2 (~117M parameters)
- Language: Spanish (es)
- Format: ONNX (fp32) + quantized int8
- Exported with: 🤗 Optimum
- Training corpus: 11.5GB of Spanish text including Wikipedia, novels, short stories, theater, poetry, and essays
Intended use
Causal language modelling / text completion in Spanish, running client-side in the browser via Transformers.js. Not an instruction or chat model.
- Downloads last month
- 19
Model tree for bnicenboim/gpt2-spanish-onnx
Base model
DeepESP/gpt2-spanish