Skip to content
Back to skills

Cross Model Candidate Pool

ASecurity

Merge candidate pools from multiple independent seq2seq models before MBR selection to reduce shared failure modes

  • 61 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 12, 2026
code-qualitypythongo

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add wenmin-wu/ds-skills --skill cross-model-candidate-pool --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cross Model Candidate Pool?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cross Model Candidate Pool
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wenmin-wu-cross-model-candidate-pool/badge)](https://www.skillsdirectory.com/skills/wenmin-wu-cross-model-candidate-pool)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nlp-cross-model-candidate-pool
description: Merge candidate pools from multiple independent seq2seq models before MBR selection to reduce shared failure modes
domain: nlp
---

# Cross-Model Candidate Pool

## Overview

Single-model MBR candidates share the same biases. Run 2+ independent models (different architectures or checkpoints), merge their candidate pools, then apply MBR on the combined pool. Reduces correlated errors and improves consensus quality.

## Quick Start

```python
def cross_model_mbr(models, tokenizer, input_ids, attn_mask, mbr_fn):
    combined_pool = []
    for model in models:
        candidates = generate_diverse_candidates(model, tokenizer, input_ids, attn_mask)
        combined_pool.extend(candidates)
        # Unload model to free GPU memory
        model.cpu()
        del model
        torch.cuda.empty_cache()
    return mbr_fn(combined_pool)
```

## Key Decisions

- **Sequential GPU loading**: load one model at a time, generate candidates, unload before next
- **Pool diversity > pool size**: 2 different architectures × 10 candidates beats 1 model × 20
- **Architecture variety**: e.g. T5-large + mBART, or different fine-tuning seeds of same arch
- **MBR on combined pool**: the scoring step is O(n^2) so cap total pool at ~50

## References

- Source: [lb-35-9-with-regex-corrections-public-model](https://www.kaggle.com/code/vitorhugobarbedo/lb-35-9-with-regex-corrections-public-model)
- Source: [lb-35-9-ensembling-post-processing-baseline](https://www.kaggle.com/code/giovannyrodrguez/lb-35-9-ensembling-post-processing-baseline)
- Competition: Deep Past Challenge - Translate Akkadian to English

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.