def load_sbert_cross_encoder_model(model_name: str, device: str, max_length: int = 512) -> Dict:
    """    
    https://huggingface.co/cross-encoder/ms-marco-TinyBERT-L-2
    scores = model.predict([('Query', 'Paragraph1'), ('Query', 'Paragraph2') , ('Query', 'Paragraph3')])

    Args:
        model_name (str): _description_

    Returns:
        Any: _description_
    """
    model_cache_key = _create_model_cache_key(model_name, device)

    if model_cache_key in get_available_models():
        model = get_available_models()[model_cache_key][AvailableModelsKey.model]
    else:
        logger.info(f"loading {model_name} on device {device} and adding to cache...")
        if model_name == '_testing':
            model = DummyModel()
            logger.warning('using the test model - << TESTING PURPOSES ONLY >>')
        elif model_name.startswith('onnx/'):
            model = HFClassificationOnnx(model_name.replace('onnx/', ''), device=device)
        else:
            model = CrossEncoder(model_name, max_length=max_length, device=device, default_activation_function=torch.nn.Sigmoid())
            if hasattr(model.tokenizer, 'model_max_length'):
                model_max_len = model.tokenizer.model_max_length
                if max_length > model_max_len:
                    model.max_length = model_max_len
                    logger.warning(f"specified max_length of {max_length} is greater than model max length of {model_max_len}, setting to model max length")
        get_available_models()[model_cache_key] ={AvailableModelsKey.model: model, AvailableModelsKey.most_recently_used_time : datetime.datetime.now()}

    return {'model':model}
    
    https://huggingface.co/cross-encoder/ms-marco-TinyBERT-L-2
    scores = model.predict([('Query', 'Paragraph1'), ('Query', 'Paragraph2') , ('Query', 'Paragraph3')])

    Args:
        model_name (str): _description_

    Returns:
        Any: _description_
    
src/marqo/s2_inference/reranking/model_utils.py