본문으로 건너뛰기

huggingface/paperswithcode

This repository hosts the code of Papers with Code, which tracks trending AI research with code, datasets and leaderboards.

https://skillcdn.ai/gh/huggingface/paperswithcode

내 AI에 이 주소를 연결하면 이 스킬을 쓸 수 있어요. 연결 방법 보기

  • 미확인
  • 기본 브랜치main
  • 커밋67161e6
  • 라이선스Apache-2.0
  • 검색단어
GitHub에서 보기

add-evals

Add evaluation results to the paperswithcode database from any source — Hugging Face model cards, arXiv/HF/PapersWithCode paper text, or GitHub repository READMEs — restricted to benchmarks that already exist with a task association and the exact leaderboard metric already configured. Use this whenever the user shares a Hugging Face model URL or repo id, an arXiv id / HF paper / PapersWithCode paper, a GitHub repository URL, or a model release page and asks to add evaluation results, benchmark scores, or leaderboard entries — even when phrased casually like "add scores from this model", "import benchmarks from <hf url>", "ingest the eval table from this paper into the DB", "grab the benchmarks from this repo's README", or "add evaluations for this release". By default import only the model(s) the source paper introduces — never post comparison-table baselines onto other papers as external evals unless the user explicitly asks. If the source is not backed by an arXiv paper, first use the add-external-paper skill to create or update the `source = 'external'` paper row, then attach evaluation rows to that paper. This skill must skip source-only metrics, component scores, subscores, and alternate metric labels unless that metric is already configured for the exact leaderboard; use it instead of generic ingestion guidance whenever the user is trying to populate evaluation results from a model, paper, or repository source.

경로
.agents/skills/add-evals/SKILL.md
라이선스
Apache-2.0

작성자를 위한 경고

  • "description" exceeds the recommended 1024 characters; it is preserved within the front-matter size limit
  • Not listed or searched: a skill under a hidden directory is discoverable only when the repository has no visible skill.

Add Evaluations

This skill imports evaluation results into the paperswithcode database from any of the common sources that ship benchmark tables: Hugging Face model cards, a paper on Arxiv/Hugging Face/paperswithcode.co, or a Github or project page URL. It is intentionally conservative: it only writes evaluation rows for benchmarks that already exist in the database with a task association and a configured leaderboard metric. It never invents new datasets, tasks, or metrics during the import, and it never imports rows for source-only metric labels that are not already configured on the exact leaderboard.

Why this exists

Model releases (especially flagship LLMs / VLMs / OCR models) advertise benchmark numbers across several surfaces — the HF model card, the technical report or arXiv paper, the GitHub README and external blog posts/project pages. Any of them can be the only source where a particular table appears, so the import workflow has to be source-agnostic but consistent. The natural workflow is:

  • Reuse existing benchmark datasets in the DB by matching names from the source.
  • Skip source benchmarks that are not yet in the DB (curate those separately later, not as a side effect).
  • Add evaluation rows for the model only on benchmarks that are fully wired up (dataset linked to any task with the specific leaderboard metric being imported).
  • Keep imports idempotent and easy to re-run.

This avoids polluting the schema with half-configured benchmarks, false-positive name matches, duplicate evaluation rows, or mixed-metric leaderboards where incomparable component scores are ranked together with canonical scores.

Pre-flight

Always run from the repo root using the project environment:

uv run --env-file backend/keys.env ...

Confirm the backend is reachable and the admin token is set:

curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8000/api/v1/datasets/1
grep -E '^PWC_ADMIN_API_TOKEN=' backend/keys.env | head -1 | sed 's/=.*/=<redacted>/'

If the API is unavailable, use the service fallback in step 7 where it applies, or report the blocker. Do not start or restart deployed services during data curation.

Common Shortcuts From Recent Curation

Transformers model docs

When the user gives a Transformers model doc URL such as https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/<model>.md, or points at data/transformers_model_doc_papers.csv, treat it as a normal source surface but use the CSV as a resolver:

  1. Look up the model doc slug or CSV line in data/transformers_model_doc_papers.csv.
  2. Use the CSV arXiv/paper mapping when it clearly identifies the source paper.
  3. Fetch the raw model doc markdown and parse its evaluation tables.
  4. If the doc describes a release with no matching arXiv paper, run add-external-paper first and attach the evals to that external row.

For "next N rows" or "lines X-Y of the CSV", process each row independently through this skill and return a compact summary: source row, paper id, rows added, skipped benchmarks, and any blocker. For larger batches, it is fine to spawn one worker subagent per row with this skill loaded, but the parent agent should still merge the final summary and avoid duplicate writes.

Misattributed or moved evaluations

If the user says existing evals landed on the wrong paper, first create or resolve the correct source row, then move only the matching rows in one transaction. Scope the update by old_paper_id, target model_name or benchmark set, and optional source_url; never move all rows from a paper unless the user explicitly asks.

uv run --env-file backend/keys.env python - <<'PY'
from sqlalchemy import text
from backend.database.connection import get_engine

old_paper_id = <old_id>
new_paper_id = <new_id>
model_pattern = "%<model name>%"
new_source_url = "<canonical source URL>"  # or None to preserve row-level sources

with get_engine().begin() as conn:
    before = conn.execute(text("""
        SELECT id, model_name, dataset_id, best_metric
        FROM evaluations
        WHERE paper_id = :old_paper_id AND model_name ILIKE :model_pattern
        ORDER BY id
    """), {"old_paper_id": old_paper_id, "model_pattern": model_pattern}).mappings().all()
    print("moving", len(before), "rows")
    conn.execute(text("""
        UPDATE evaluations
        SET paper_id = :new_paper_id,
            source_url = COALESCE(:new_source_url, source_url)
        WHERE paper_id = :old_paper_id AND model_name ILIKE :model_pattern
    """), {
        "old_paper_id": old_paper_id,
        "new_paper_id": new_paper_id,
        "model_pattern": model_pattern,
        "new_source_url": new_source_url,
    })
PY

After moving rows, verify zero matching rows remain on the old paper, the expected count appears on the new paper, and duplicate keys were not created.

Workflow

1. Identify and fetch the evaluation source

Different starting points should converge on the same triple — a model identity, an evaluation table, and a paper row to attach it to. Pick the first source below that the user actually gave you, and then follow the fallback chain until you have an evaluation table:

  1. HF model repo / card — fetch the card and inspect the metadata. Always invoke hf via uv run so the venv-installed CLI is used:

    mkdir -p /tmp/<repo_slug>
    uv run hf models card <repo_id> --text > /tmp/<repo_slug>/card.md
    uv run hf models info <repo_id> > /tmp/<repo_slug>/info.json
    

    The model card is the primary surface. If it has evaluation tables, that is your source. If it does not, read the info.json metadata: the card's arxiv tag (e.g. arxiv:2401.12345) or papers field points at a linked paper, and the card body or repo description often contains a GitHub URL. Fall through to step 2 / 3 with those identifiers.

  2. Paper (arXiv, HF, PDF report, or PapersWithCode paper with an arXiv ID) — when the source is a paper directly, or the model card was missing evals, read the paper as markdown and inspect linked artifacts:

    uv run hf papers read <arxiv_id> > /tmp/<paper_slug>/paper.md
    uv run hf papers info <arxiv_id> > /tmp/<paper_slug>/paper-info.json
    

    Extract evaluation tables from the paper body first. If the paper itself has no usable table, look for official artifacts linked from the paper text and metadata. For PDF reports that need an external paper row, inspect the extracted first pages for a real abstract/opening summary and pass that text verbatim to add-external-paper; do not generate a replacement summary when the PDF already contains one. Also distinguish official GitHub repositories from cited dependencies or frameworks before creating the external row, because official repo URLs should be marked official while incidental GitHub links should not be.

    For papers with an arXiv ID, also look for HF models tagged with that paper. The current uv run hf papers info <arxiv_id> output does not reliably expose linked models, so use the Hugging Face model search page directly:

    curl -L "https://huggingface.co/models?other=arxiv:<arxiv_id>" > /tmp/<paper_slug>/hf-models.html
    

    Treat matching HF model cards as candidate sources only. A model can appear in this search simply because its README/model card mentions the arXiv ID, not because the paper introduced that model. Before parsing evals from any discovered model card, be 100% sure the model was introduced by the paper itself: the model card should clearly present the paper as the model's own technical report/release paper, share the same authors/organization/release context, and not merely cite the paper as related work, a base model, a benchmark source, or background. If this is not certain, do not use that model card as a source; ask the user or skip it.

    For each confirmed introduced model, fetch the model card and metadata as in step 1 and use its evaluation tables as candidate source rows. If the paper has no usable table but lists a GitHub repo, fall through to step 3.

  3. GitHub repository — when the model card or paper points to a GitHub repo, or the user provided one directly, fetch the README via the gh CLI and use it as the source:

    gh repo view <owner>/<repo> --json description,url,homepageUrl > /tmp/<repo_slug>/repo.json
    gh api repos/<owner>/<repo>/readme -H "Accept: application/vnd.github.raw" > /tmp/<repo_slug>/README.md
    

    Repo READMEs often contain the most complete benchmark tables for new releases (especially for OCR/VLM/robotics models). Treat README tables exactly like card tables for the rest of the workflow.

    GitHub repositories are also an important source-availability signal. Do not mark a row closed merely because the paper page has no direct HF model link. Inspect the official repo for:

    • direct checkpoint links, release assets, Git LFS pointers, or download scripts;
    • training/evaluation scripts and configs that reproduce the reported checkpoint from public data or listed public artifacts;
    • linked Hugging Face model or dataset repos in the README, docs, shell scripts, config files, or release notes.

    If the official repo clearly releases weights, or clearly provides reproducible scripts for the evaluated model/checkpoint, treat the evaluated row as open (is_open = true) even when hf_model_url stays unset. Example: a paper whose official GitHub repo contains scripts to reproduce the reported policy checkpoint should not be marked closed just because Hugging Face has no linked model card.

    When the README or repo files mention HF repos that are not linked from the HF paper page, inspect them directly. HF repos without model cards, without arxiv: tags, or without README metadata can still be official if the source GitHub repo links them. Use these links for papers.hf_models and evaluations.hf_model_url only when the source ties them to the evaluated variant.

  4. Benchmark chart image — when a card, README, or release page has no text score for a benchmark but embeds a results chart, download the image and read it (image viewer / vision). Import only values printed on the chart as numbers for bars clearly labeled as the introduced model; never estimate from bar height or axis gridlines. Apply the same version, split, setting, metric, and scale rules as for a table, and cite the image URL plus the exact panel title, bar label, and printed value (for example Chart image on https://huggingface.co/org/model: panel "SWE-bench Verified", bar "Model-X (thinking)", printed "74.2") as the row's evidence. Prefer a text table whenever one exists. The remote curator follows the same procedure in remote-paper-curation/SKILL.md.

You can combine sources when each one carries part of the picture (e.g. the card has the "main" table, the paper has an ablation, the README has the final leaderboard). Track per-row context — which source the score came from, model variant / mode / shot count / metric label / backbone head or task framework / harness notes — so model names and methodology lines you write later are accurate and traceable.

While reading each source, also pin down the raw model parameter count for every model row you intend to import, since the database stores it on each evaluation (evaluations.num_parameters, BIGINT). Check, in order: the HF model info JSON (safetensors.total or an explicit parameter field), the model card / paper / README headline that states the model size (e.g. "7B parameters", "355B-A22B", "1.5 billion parameters"), and any size column already in the source's own benchmark table. Convert size labels to the raw integer (7B -> 7_000_000_000, 355B-A22B -> 355_000_000_000 total parameters not active, 1.5B -> 1_500_000_000, 355M -> 355_000_000). Mixture-of-experts models should use total parameters by default; if you store the active count instead, mention it in methodology so the meaning of the stored value is unambiguous. If the source does not state the parameter count clearly for that specific variant, do not guess from sibling models, blog headlines, or organization conventions — leave the field unset for that row and report it as missing. Accuracy matters more than coverage here.

While reading each source, also try to pin down the official Hugging Face model repo URL for every model row you intend to import, since the database stores it per evaluation (evaluations.hf_model_url, TEXT). This is strictly opt-in: only set it when you are 100% certain the repo is the exact evaluated model — never guess, and prefer leaving it blank over risking a false positive. Apply these rules:

  • Certainty gate. Only populate hf_model_url when the source itself ties the score to that specific repo: the score table is on that model card, the card/README/paper explicitly links the evaluated checkpoint to the repo, or the repo id unambiguously matches the evaluated variant name and size. If a benchmark number could belong to a sibling model, a different size, a base vs instruct variant, or a comparator you are not 100% sure about, leave hf_model_url unset for that row.
  • Prefer the official organization. Use the repo under the model's official HF organization (e.g. MiniMaxAI/MiniMax-M3, Qwen/..., deepseek-ai/...), not community re-uploads, mirrors, finetunes, or third-party conversions, even when those rank higher in search. If only a community mirror exists and no official repo, leave the field unset rather than linking the mirror.
  • Prefer the non-quantized weights. When the official org publishes several variants of the same checkpoint that differ only by precision/quantization (e.g. a base repo plus -FP8, -float16, -INT4, -GGUF, -AWQ, -GPTQ repos), link the full-precision / non-quantized base repo. Only link a quantized repo when the evaluated row is specifically that quantized variant.
  • Distinct model variants get their own URL. Different evaluated variants (size, mode, backbone) that have their own official repos should each point at their own repo; do not reuse one repo across rows that are genuinely different models.
  • HF paper linkage is not required. A repo can be official even when it is not returned by hf papers info, has no model card, lacks an arxiv: tag, or is absent from the HF paper page. If the paper's official GitHub/project page links the repo and the repo contains the evaluated checkpoint/files, it is eligible for hf_model_url.

Closed-source API models (Claude/GPT/Gemini and similar) usually have no downloadable weights repo — leave hf_model_url unset for those rows. This field is independent of the paper-level papers.hf_models array; keep appending official model URLs there for traceability regardless.

Do not extract Elo scores. Cards, papers, and READMEs increasingly include LLM-judged Elo rankings (e.g. Gemini-judged Elo over olmOCR-Bench / OmniDocBench / XDocParse / OCRArena). These are pairwise-comparison rankings, not the benchmark's native metric, and they are tied to the specific judge model and pool of comparators used at the time of publication. They do not map to any leaderboard metric in this database and they are not comparable across sources, so skip every Elo table outright and only ingest the underlying native-metric tables (Accuracy, Edit Distance, ANLS, Pass@1, Score, etc.). Mention the skipped Elo table in the final report so the user knows it was intentional.

스킬의 지침이 아직 전부 로드되지 않았습니다. 계속 읽어 상위 폴더의 규칙과 필수 내용을 확인하세요.

이 스킬의 파일

이 스킬에는 보조 파일이 없습니다.

지원 파일 전체 둘러보기