CoolFace
Modelpublic

uzabase/LLM2Vec-Llama-2-7b-hf-mntp-unsup-simcse

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes7downloads
Model Card

Model Info

This is a model that applies LLM2Vec to Llama-2. Only the PEFT Adapter is distributed. LLM2Vec is fine-tuned on two tasks: MNTP and SimCSE, and this repository contains the results of applying SimCSE after MNTP. For the MNTP Adapter, please refer to this link.

Model Details

Model Description

<!-- Provide a longer summary of what this model is. -->

  • —Model type: PEFT
  • —Language(s) (NLP): English
  • —License: Apache2.0
  • —Finetuned from model: Llama-2-7b-hf

Model Sources [optional]

  • —Repository: https://github.com/McGill-NLP/llm2vec
  • —Paper: https://arxiv.org/abs/2404.05961

Usage

BenchMark

  • —Followings are summaries. Details are here

MTEB(Japansese)

ClassificationClusteringPairClassificationRerankingBitextMiningRetrievalStsAVG
Llama2-Llm2vec-eng (This repo)0.5270.2580.5010.2170.2750.2960.7650.408
Llama2-Llm2vec-jpn0.5700.3650.5100.3490.4700.4170.7950.498
Swallow-Llm2vec-jpn0.6210.3910.5100.4750.4750.4910.8320.523

MTEB(English)

ClassificationClusteringPair_ClassificationRerankingRetrievalSTS平均
Llama2-Llm2vec-eng (this repo)0.7090.3860.7800.5880.3290.7230.586
Llama2-Llm2vec-jpn0.7220.4280.7850.5940.3710.7170.603
Swallow-Llm2vec-jpn0.6950.3850.7510.5760.3180.7100.572

Training Details

Training Data

Training Hyperparameter

  • —simcse_dropout: 0.3
  • —bidirectional: true
  • —pooling_mode: "mean"
  • —removeunusedcolumns: false
  • —learning_rate: 3e-5
  • —loss_scale: 20
  • —batch_size: 256
  • —gradientaccumulationsteps: 1
  • —maxseqlength: 128
  • —lora_r: 16
  • —torch_dtype: "bfloat16"
  • —attnimplementation: "flashattention_2"
  • —seed: 42
  • —bf16: true
  • —gradient_checkpointing: true

Accelerator Settings

  • —deepspeed_config:
  • —gradientaccumulationsteps: 1
  • —gradient_clipping: 1.0
  • —offloadoptimizerdevice: nvme
  • —offloadoptimizernvme_path: /nvme
  • —zero3save16bit_model: true
  • —zero_stage: 2
  • —distributed_type: DEEPSPEED
  • —downcast_bf16: 'no'
  • —dynamo_config:
  • —dynamo_backend: INDUCTOR
  • —dynamo_mode: default
  • —dynamousedynamic: true
  • —dynamousefullgraph: true
  • —enablecpuaffinity: false
  • —machine_rank: 0
  • —maintrainingfunction: main
  • —mixed_precision: bf16
  • —num_machines: 1
  • —num_processes: 2
  • —rdzv_backend: static
  • —same_network: true
  • —quse_cpu: false

Framework versions

  • —Python: 3.12.3
  • —PEFT 0.11.1
  • —Sentence Transformers: 3.0.1
  • —Transformers: 4.41.0
  • —PyTorch: 2.3.0
  • —Accelerate: 0.30.1
  • —Datasets: 2.20.0
  • —Tokenizers: 0.19.1
  • —MTEB: 1.13.0