Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

[TechDebt] Inconsistency between query and corpus encoders in handling --fp16 #2407

@sahel-sh

Description

@sahel-sh

Query encoders get --fp16 during init1, While document encoders get it passed to their encode function2.
On its own this is not an issue, but it makes it more likely for --fp16 to silently get dropped if the developer expects/assumes identical behavior, e.g, UniIR encoders3.

It would be safest to pass it in both places to both encoders and double check the current encoder implementations. It would also require an audit of 2crs were fp16 has been used with encoders that are impacted.

Related issue: #2406

Footnotes

  1. https://github.com/castorini/pyserini/blob/e9b559c32c10893ae61c12a0c1e9ee2b264a2e41/pyserini/search/faiss/__main__.py#L294

  2. https://github.com/castorini/pyserini/blob/master/pyserini/encode/__main__.py#L148(https://github.com/castorini/pyserini/blob/master/pyserini/encode/__main__.py#L148)

  3. https://github.com/castorini/pyserini/blob/e9b559c32c10893ae61c12a0c1e9ee2b264a2e41/pyserini/encode/optional/_uniir.py#L108

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions