支持图文输入,匹配文本吗

#4
by mayamonwang - opened

支持图文输入,匹配文本吗?
我看代码不支持,但是你们的接口支持

传统文本重排任务是支持的

query = "slm markdown"
documents = [
    "We present ReaderLM-v2, a compact 1.5 billion parameter language model designed for efficient web content extraction. Our model processes documents up to 512K tokens, transforming messy HTML into clean Markdown or JSON formats with high accuracy -- making it an ideal tool for grounding large language models. The models effectiveness results from two key innovations: (1) a three-stage data synthesis pipeline that generates high quality, diverse training data by iteratively drafting, refining, and critiquing web content extraction; and (2) a unified training framework combining continuous pre-training with multi-objective optimization. Intensive evaluation demonstrates that ReaderLM-v2 outperforms GPT-4o-2024-08-06 and other larger models by 15-20% on carefully curated benchmarks, particularly excelling at documents exceeding 100K tokens, while maintaining significantly lower computational requirements.",
    "数据提取么?为什么不用正则啊,你用正则不就全解决了么?",
    "During the California Gold Rush, some merchants made more money selling supplies to miners than the miners made finding gold.",
    "Die wichtigsten Beiträge unserer Arbeit sind zweifach: Erstens führen wir eine neuartige dreistufige Datensynthese-Pipeline namens Draft-Refine-Critique ein, die durch iterative Verfeinerung hochwertige Trainingsdaten generiert; und zweitens schlagen wir eine umfassende Trainingsstrategie vor, die kontinuierliches Vortraining zur Längenerweiterung, überwachtes Feintuning mit spezialisierten Kontrollpunkten, direkte Präferenzoptimierung (DPO) und iteratives Self-Play-Tuning kombiniert. Um die weitere Forschung und Anwendung der strukturierten Inhaltsextraktion zu erleichtern, ist das Modell auf Hugging Face öffentlich verfügbar.",
]

# construct sentence pairs
text_pairs = [[query, doc] for doc in documents]

scores = model.compute_score(text_pairs, max_length=1024, doc_type="text")
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment