jeffreyzhang92 commited on
Commit
7e76a6e
·
verified ·
1 Parent(s): f786ae8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -10
README.md CHANGED
@@ -1,11 +1,23 @@
1
- # BioLLM2Vec
2
-
3
- This repository contains the model weights for the reranking embedding model used in BioLitGPT. The main github repository is at https://github.com/jeffreyzhang92/BioLitGPT.
4
-
5
- Basic usage:
6
-
7
- ```
8
- from llm2vec import LLM2Vec
9
- model = LLM2Vec.from_pretrained("McGill-NLP/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp", peft_model_name_or_path="YBXL/BioRankLLaMA")
10
- embedding = model.encode("This is a sentence")
 
 
 
 
 
 
 
 
 
 
 
 
11
  ```
 
1
+ # BioLLM2Vec
2
+
3
+ This repository contains the model weights for the reranking embedding model used in BioLitGPT. The main github repository is at https://github.com/jeffreyzhang92/BioLitGPT.
4
+
5
+ Basic usage:
6
+
7
+ ```
8
+ import torch
9
+ from llm2vec import LLM2Vec
10
+ model = LLM2Vec.from_pretrained("McGill-NLP/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp",
11
+ peft_model_name_or_path="YBXL/BioRankLLaMA",
12
+ device_map="cuda" if torch.cuda.is_available() else "cpu",
13
+ torch_dtype=torch.bfloat16,
14
+ revision="main"
15
+ )
16
+ embedding = model.encode("This is a sentence")
17
+ ```
18
+
19
+ You will also require access to the Meta LLaMA repository to load the model: https://huggingface.co/meta-llama
20
+ ```
21
+ from huggingface_hub import login
22
+ login("insert_hf_access_token_here")
23
  ```