Instructions to use yennguyen45/vp2vi-polish-web with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use yennguyen45/vp2vi-polish-web with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('translation', 'yennguyen45/vp2vi-polish-web');
vp2vi (ONNX, INT8, web build)
Browser-ready build of DanVP/vp2vi, a MarianMT model that polishes VietPhrase/QT-style Chinese web-novel drafts into more natural Vietnamese (Vietnamese → Vietnamese, not a Chinese→Vietnamese translator).
All credit for training the base model goes to the original author. This repo only adds:
- ONNX export with KV-cache (
encoder_model_quantized.onnx+decoder_model_merged_quantized.onnx) - Dynamic INT8 quantization (~4x smaller than fp32)
- A hand-built
tokenizer.jsonfast-tokenizer (the original model only ships slow sentencepiece files, whichtransformers.jscannot load directly) — verified to produce byte-identical token ids to the original slowMarianTokenizer.
Shares the same 24k joint ZH+VI vocabulary as yennguyen45/hachimimt-60-zh-vi-web, so the
two are meant to be used as a pipeline: HachimiMT translates zh→vi, then this model
polishes the result.
Usage (transformers.js)
import { pipeline } from '@huggingface/transformers';
const polish = await pipeline('translation', 'yennguyen45/vp2vi-polish-web', { dtype: 'q8' });
const out = await polish('Hắn chậm rãi ngẩng đầu, trong mắt lóe lên một tia hàn mang.');
console.log(out[0].translation_text);
License
CC-BY-4.0, inherited from the base model. Please credit the original author (DanVP) when using this model.
- Downloads last month
- 47