harbor run -t openthoughts/tasktrove-exp-flat25-speed-bonus-v2-5k-speed-0808harbor download openthoughts/tasktrove-exp-flat25-speed-bonus-v2-5k-speed-0808Task: Implement KNRM parameter validation and a POSITDRMM utility suite to satisfy the provided tests.
What to implement (functionality and behavior)
KNRM.validate_params(config)
POSITDRMM utilities (class POSITDRMM) Implement as a small utility class with static methods to operate on 1D PyTorch tensors and 2D batches as shown in tests.
get_exact_match_count(query: torch.Tensor, doc: torch.Tensor, query_idf) -> (float, float)
get_bigrams(doc: torch.Tensor) -> torch.Tensor
get_bigram_match_count(query: torch.Tensor, doc: torch.Tensor) -> float
get_exact_match_stats(query_idf: torch.Tensor, queries: torch.Tensor, docs: torch.Tensor) -> (torch.Tensor, torch.Tensor, torch.Tensor)
Self-contained and actionable details
Acceptance criteria
BONUS: Complete this task as quickly as possible. Faster solutions are preferred.