Feature Extraction
sentence-transformers
PyTorch
Safetensors
Transformers
English
mistral
mteb
Eval Results (legacy)
Eval Results
text-embeddings-inference
Instructions to use intfloat/e5-mistral-7b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use intfloat/e5-mistral-7b-instruct with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("intfloat/e5-mistral-7b-instruct") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use intfloat/e5-mistral-7b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="intfloat/e5-mistral-7b-instruct")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("intfloat/e5-mistral-7b-instruct") model = AutoModel.from_pretrained("intfloat/e5-mistral-7b-instruct") - Inference
- Notebooks
- Google Colab
- Kaggle
lora config
#6
by SeanLee97 - opened
Excellent work!
I've read the technical paper. It mentions the inclusion of LoRA adapters in all linear layers.
Based on my understanding, you specified the target_modules as follows: ['v_proj', 'q_proj', 'down_proj', 'k_proj', 'gate_proj', 'o_proj', 'up_proj'].
Is my understanding correct?
Could you share the detailed Lora config? Thx!
Thanks @SeanLee97 ! I learn a lot from your AnglE paper!
The released model contains merged lora weights, I thought this would make it more convenient to use without depending on PEFT library.
Here is our LoRA config:
{
"auto_mapping": null,
"base_model_name_or_path": "mistralai/Mistral-7B-v0.1",
"bias": "none",
"fan_in_fan_out": false,
"inference_mode": true,
"init_lora_weights": true,
"layers_pattern": null,
"layers_to_transform": null,
"lora_alpha": 32,
"lora_dropout": 0.1,
"modules_to_save": null,
"peft_type": "LORA",
"r": 16,
"revision": null,
"target_modules": [
"q_proj",
"k_proj",
"v_proj",
"o_proj",
"down_proj",
"up_proj",
"gate_proj"
],
"task_type": "FEATURE_EXTRACTION"
}