ModelHub XC dc5b3f9c85 初始化项目,由ModelHub XC社区提供模型
Model: yibinlei/effir-mistral-drop-8-mlp
Source: Original Platform
2026-07-11 20:27:26 +08:00

library_name, base_model, tags
library_name base_model tags
transformers mistralai/Mistral-7B-v0.1
effir
retrieval
mteb
mistral
peft
lora
custom_code

EffiR Mistral Drop 8 MLP

EffiR Mistral dense retriever with direct layer dropping.

Use trust_remote_code=True.

from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
from huggingface_hub import hf_hub_download
import torch

repo = "yibinlei/effir-mistral-drop-8-mlp"

tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
config = AutoConfig.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    repo,
    config=config,
    trust_remote_code=True,
    attn_implementation="eager",
    torch_dtype=torch.bfloat16,
)

input_emb_path = hf_hub_download(repo, "embedding/input_emb.pth")
model.set_input_embeddings(torch.load(input_emb_path, map_location="cpu"))
model = PeftModel.from_pretrained(model, repo)
model = model.merge_and_unload()
Description
Model synced from source: yibinlei/effir-mistral-drop-8-mlp
Readme 1.1 MiB
Languages
Python 100%