Views
No views yet
cyberagent/CAT-Translate-0.8b for Japanese ↔ English translation.b386247b30fd3b1911f7c694700d73843c376c6etext-generationtext-generation-with-past1.09 MiB894.77 MiB1import { pipeline } from '@huggingface/transformers';
2
3const translator = await pipeline('text-generation', 'goryodog/tokihisu-cat-translate-0.8b-q4', {
4 device: 'webgpu',
5 dtype: 'q4',
6});
7
8const prompt = 'Translate the following Japanese text into English.\n\nこんにちは。';
9const result = await translator([{ role: 'user', content: prompt }], {
10 max_new_tokens: 160,
11 do_sample: false,
12 return_full_text: false,
13});
14console.log(result);1Translate the following {source language} text into {target language}.
2
3{source text}conversion-manifest.json for exact package versions, source pin, graph I/O,
quantization settings, and SHA-256 hashes.LICENSE and the original model repository.