Views
No views yet
meta-llama/Meta-Llama-3-8B-InstructMcGill-NLP/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp and
McGill-NLP/LLM2Vec-Meta-Llama-3-8B-Instruct-mntp-supervisedquantization_config is serialized in config.json — from_pretrained restores
it automatically; requires bitsandbytes)LlamaBiModel (bidirectional attention, LLM2Vec), mean pooling,
max length 512 (llm2vec_config.json)<meta-llama revision>, adapter revisions
<mntp revision> / <supervised revision>, tooling: Aero-Ex/kimodo fork
commit bfc2dc4 (Apache-2.0)1from kimodo.model.llm2vec.llm2vec import LLM2Vec # nv-tlabs/kimodo
2model = LLM2Vec.from_pretrained(
3 base_model_name_or_path="<this repo or a local download>",
4 peft_model_name_or_path=None, # adapters are already baked in
5 torch_dtype=torch.float16,
6 device_map={"": "cuda:0"}, # or {"": "cpu"} to hold it in system RAM
7)
8emb = model.encode(["A person walks forward"], batch_size=1)