CoolFace
Modelpublic

Remidesbois/f2llm-v2-160m-one-piece-retrieval

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes84downloads
Model Card

F2LLM-v2-160M One Piece Retrieval

Fine-tuned text embedding model for page retrieval in the One Piece Indexer project.

This model starts from codefuse-ai/F2LLM-v2-160M and was fine-tuned on page descriptions, metadata, OCR bubble text, search logs, and explicit feedback from the project database. It is intended for French semantic search over manga page descriptions and related OCR text.

The repository includes:

  • —model.safetensors: PyTorch/Sentence Transformers checkpoint.
  • —onnx/model.onnx: ONNX export for Transformers.js browser inference and local Node inference.
  • —tokenizer/config files required by Transformers.js.
  • —training_manifest.json: local training configuration snapshot.

Intended Use

Use the model as a dense retrieval encoder:

  • —query text uses the F2LLM query instruction prompt: Instruct: Given a question, retrieve passages that can help answer the question.\nQuery:
  • —document/page text is embedded without the query prompt.
  • —embeddings are 640 dimensions and should be L2-normalized before cosine/IP search.

Local Evaluation

Evaluation was run on page-level held-out splits, so generated queries for the same page do not leak across train/eval/test.

SplitQueriesHit@1Hit@5Hit@10MRR@10NDCG@10Known bad@10
eval5180.6700.8940.9590.7610.8030.000
test4850.6540.8910.9440.7550.7980.002

Baseline on the same splits with the original local F2LLM-v2-160M package:

SplitQueriesHit@1Hit@5Hit@10MRR@10NDCG@10Known bad@10
eval5180.5520.7280.8200.6320.6730.000
test4850.5200.7130.8000.6100.6530.002

Historical production-context benchmark rows from earlier real feedback labels are useful context only because they are not the same split:

VariantQueriesHit@10MRR@10NDCG@10
F2LLM 160M text document750.8130.5330.584
current Voyage DB730.9320.6500.693
current Gemini DB750.2000.1150.121
current dual DB750.7470.4130.478

Training Snapshot

  • —pages: 1060
  • —training pairs: 4432
  • —epochs: 1
  • —batch size: 8
  • —learning rate: 2e-5
  • —max sequence length: 512
  • —loss: MultipleNegativesRankingLoss

Data source mix:

  • —synthetic page-scene queries
  • —character/arc/keyword queries
  • —search feedback positives
  • —search log top-result positives
  • —OCR bubble quotes where available

ONNX Export

The ONNX model was exported with Optimum as a feature-extraction graph at sequence length 512. Export verification completed with a maximum absolute PyTorch-vs-ONNX output difference of 0.000141.

Caveats

This model is specialized for the project dataset and is not a general-purpose embedding benchmark result. Real replacement quality should keep being monitored with fresh search_feedback and search_logs labels after deployment.