You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Answer Evaluator (fine-tuned) — ONNX INT8

Weight-only INT8 ONNX export (opset 17) of ekinox-io/AnswerEvaluator, pinned to revision 46e3b8a585d64d97f13bf1c5ec6b925cf64e60a7. Every weight matrix is INT8 with one scale per output column, embedding tables included; activations stay in FP32, so the feed-forward activation outliers that break fully dynamic quantization cannot degrade the output. The model evaluates French student answers with four independent binary labels.

Files

  • model.int8.onnx — weight-only INT8 model (112.6 MB)
  • config.json — model configuration and label mapping
  • tokenizer files — text preprocessing
  • quantization_report.json — quantized operator counts, size reduction and FP32 logit parity
  • artifact_manifest.json — files managed by this export pipeline

Inputs and output

  • input_ids: int64 [batch, sequence]
  • attention_mask: int64 [batch, sequence]
  • logits: float32 [batch, 4]

Labels, in output order: is_true, is_relevant, is_complete, is_syntax_correct. Apply sigmoid independently to each logit; do not use argmax.

The expected text format is:

Question : ... [SEP] Réponse attendue : ... [SEP] Réponse élève : ... [SEP] Texte : ...

Usage

This repository is gated. Request access, then authenticate with hf auth login.

import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
from transformers import AutoConfig, AutoTokenizer

repo_id = "ekinox-io/AnswerEvaluator-finetuned-int8"
text = (
    "Question : Que boit l'enfant ? [SEP] "
    "Réponse attendue : L'enfant boit du lait. [SEP] "
    "Réponse élève : Il boit du lait. [SEP] "
    "Texte : Après le repas, l'enfant boit un verre de lait."
)

tokenizer = AutoTokenizer.from_pretrained(repo_id, token=True)
config = AutoConfig.from_pretrained(repo_id, token=True)
inputs = tokenizer(text, return_tensors="np", truncation=True, max_length=512)
model_path = hf_hub_download(repo_id, "model.int8.onnx", token=True)
session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])
logits = session.run(
    ["logits"],
    {
        "input_ids": inputs["input_ids"].astype(np.int64),
        "attention_mask": inputs["attention_mask"].astype(np.int64),
    },
)[0]
probabilities = 1 / (1 + np.exp(-logits[0]))
labels = [config.id2label[index] for index in range(config.num_labels)]
predictions = dict(zip(labels, (probabilities >= 0.5).tolist()))
print(predictions)
Downloads last month
51
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support