ONNX 模型库
返回模型

说明文档

CoEdIT Large (ONNX)

Grammarly CoEdIT-Large 模型的 ONNX 量化版本,用于基于浏览器的文本编辑和语法错误纠正,使用 Transformers.js

原始模型

转换详情

  • 格式: ONNX
  • 量化: INT8 (动态量化)
  • 大小: ~780MB
  • 转换工具: Optimum CLI

工作原理

CoEdIT 是一个针对各种编辑任务进行微调的文本到文本模型。对于语法纠正,请使用以下提示格式:

Fix grammatical errors: <input text>

模型将直接生成纠正后的文本。

使用 Transformers.js

import { pipeline } from '@huggingface/transformers';

const corrector = await pipeline(
  'text2text-generation',
  'YOUR_USERNAME/coedit-large',
  { dtype: 'q8' }
);

const result = await corrector('Fix grammatical errors: He go to school yesterday.');
console.log(result[0].generated_text);
// \"He went to school yesterday.\"

支持的任务

CoEdIT 通过不同的提示支持多种编辑任务:

  • Fix grammatical errors: ... - 语法纠正
  • Paraphrase: ... - 改写
  • Simplify: ... - 文本简化
  • Make this more formal: ... - 正式化转换
  • Make this more coherent: ... - 连贯性改进

性能

比 GECToR 更灵活 (可以重写句子),但由于自回归生成,速度较慢。

许可证

Apache 2.0 (遵循原始模型许可证)

Meyssa/coedit-large

作者 Meyssa

text-generation transformers.js
↓ 0 ♥ 0

创建时间: 2025-12-29 12:48:07+00:00

更新时间: 2025-12-29 12:49:23+00:00

在 Hugging Face 上查看

文件 (11)

.gitattributes
README.md
config.json
generation_config.json
onnx/config.json
onnx/decoder_model_merged_quantized.onnx ONNX
onnx/encoder_model_quantized.onnx ONNX
onnx/ort_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json