Add nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise
Browse filesUpload fine-tuned rerankers for BioASQ 14B
Co-authored-by: André Ribeiro <andrepedro2004@hotmail.com>
Co-authored-by: Rúben Garrido <rubengarrido@ua.pt>
- .gitattributes +1 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/config.json +48 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/llama_bidirectional_model.py +362 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/model.safetensors +3 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/ranx_results.json +31 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/tokenizer.json +3 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/tokenizer_config.json +14 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/trainer_state.json +757 -0
- nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/training_args.bin +3 -0
.gitattributes
CHANGED
|
@@ -36,3 +36,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 36 |
BAAI-bge-reranker-base-E2-S1-Mpairwise-FullDataTrue/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
BAAI-bge-reranker-v2-m3-E2-S1-Mpairwise-FullDataTrue/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
nvidia-llama-nemotron-rerank-1b-v2-E2-S4-Mmulti_neg_pairwise-Linfonce-FullData/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 36 |
BAAI-bge-reranker-base-E2-S1-Mpairwise-FullDataTrue/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
BAAI-bge-reranker-v2-m3-E2-S1-Mpairwise-FullDataTrue/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
nvidia-llama-nemotron-rerank-1b-v2-E2-S4-Mmulti_neg_pairwise-Linfonce-FullData/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaBidirectionalForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "llama_bidirectional_model.LlamaBidirectionalConfig",
|
| 9 |
+
"AutoModelForSequenceClassification": "llama_bidirectional_model.LlamaBidirectionalForSequenceClassification"
|
| 10 |
+
},
|
| 11 |
+
"bos_token_id": 128000,
|
| 12 |
+
"dtype": "bfloat16",
|
| 13 |
+
"eos_token_id": 128001,
|
| 14 |
+
"head_dim": 64,
|
| 15 |
+
"hidden_act": "silu",
|
| 16 |
+
"hidden_size": 2048,
|
| 17 |
+
"id2label": {
|
| 18 |
+
"0": "LABEL_0"
|
| 19 |
+
},
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 8192,
|
| 22 |
+
"label2id": {
|
| 23 |
+
"LABEL_0": 0
|
| 24 |
+
},
|
| 25 |
+
"max_position_embeddings": 131072,
|
| 26 |
+
"mlp_bias": false,
|
| 27 |
+
"model_type": "llama_bidirec",
|
| 28 |
+
"num_attention_heads": 32,
|
| 29 |
+
"num_hidden_layers": 16,
|
| 30 |
+
"num_key_value_heads": 8,
|
| 31 |
+
"pad_token_id": 128001,
|
| 32 |
+
"pooling": "avg",
|
| 33 |
+
"pretraining_tp": 1,
|
| 34 |
+
"rms_norm_eps": 1e-05,
|
| 35 |
+
"rope_parameters": {
|
| 36 |
+
"factor": 32.0,
|
| 37 |
+
"high_freq_factor": 4.0,
|
| 38 |
+
"low_freq_factor": 1.0,
|
| 39 |
+
"original_max_position_embeddings": 8192,
|
| 40 |
+
"rope_theta": 500000.0,
|
| 41 |
+
"rope_type": "llama3"
|
| 42 |
+
},
|
| 43 |
+
"temperature": 1.0,
|
| 44 |
+
"tie_word_embeddings": true,
|
| 45 |
+
"transformers_version": "5.2.0",
|
| 46 |
+
"use_cache": false,
|
| 47 |
+
"vocab_size": 128256
|
| 48 |
+
}
|
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/llama_bidirectional_model.py
ADDED
|
@@ -0,0 +1,362 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0.
|
| 3 |
+
"""
|
| 4 |
+
Bidirectional Llama model for cross-encoder reranking.
|
| 5 |
+
|
| 6 |
+
Modifies LlamaModel to use bidirectional (non-causal) attention so each token
|
| 7 |
+
attends to all others — required for cross-encoder scoring of query-document pairs.
|
| 8 |
+
|
| 9 |
+
Provides three classes:
|
| 10 |
+
- LlamaBidirectionalConfig: Adds pooling and temperature to LlamaConfig.
|
| 11 |
+
- LlamaBidirectionalModel: LlamaModel with causal masking replaced by
|
| 12 |
+
bidirectional masking. Overrides forward() to support transformers >=4.44.
|
| 13 |
+
- LlamaBidirectionalForSequenceClassification: Pools hidden states and
|
| 14 |
+
projects to a relevance score via a linear head.
|
| 15 |
+
|
| 16 |
+
Transformers version compatibility (>=4.44 including 5.0+):
|
| 17 |
+
The forward() implementation handles these API changes at import time via
|
| 18 |
+
inspect.signature() on LlamaDecoderLayer and DynamicCache:
|
| 19 |
+
|
| 20 |
+
< 4.53: _update_causal_mask exists on LlamaModel (not used here).
|
| 21 |
+
4.53+: Masking moved to masking_utils; requires full forward() override.
|
| 22 |
+
< 4.54: Decoder layer returns a tuple.
|
| 23 |
+
4.54+: Decoder layer returns a tensor.
|
| 24 |
+
< 4.56: Cache kwarg is ``past_key_value`` (singular).
|
| 25 |
+
4.56+: Cache kwarg is ``past_key_values`` (plural); DynamicCache accepts config.
|
| 26 |
+
5.0+: Native ``create_bidirectional_mask`` in masking_utils.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
import inspect
|
| 30 |
+
from typing import Optional, Union, Tuple, List
|
| 31 |
+
|
| 32 |
+
import torch
|
| 33 |
+
import torch.nn as nn
|
| 34 |
+
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
| 35 |
+
from transformers.modeling_outputs import SequenceClassifierOutputWithPast
|
| 36 |
+
from transformers.cache_utils import Cache, DynamicCache
|
| 37 |
+
from transformers.modeling_outputs import BaseModelOutputWithPast
|
| 38 |
+
from transformers.models.llama.configuration_llama import LlamaConfig
|
| 39 |
+
from transformers.models.llama.modeling_llama import (
|
| 40 |
+
LlamaDecoderLayer,
|
| 41 |
+
LlamaModel,
|
| 42 |
+
LlamaPreTrainedModel,
|
| 43 |
+
)
|
| 44 |
+
from transformers.utils import logging
|
| 45 |
+
|
| 46 |
+
logger = logging.get_logger(__name__)
|
| 47 |
+
|
| 48 |
+
# Check if native create_bidirectional_mask exists (transformers >= 5.0)
|
| 49 |
+
try:
|
| 50 |
+
from transformers.masking_utils import create_bidirectional_mask
|
| 51 |
+
|
| 52 |
+
_HAS_NATIVE_BIDIRECTIONAL_MASK = True
|
| 53 |
+
except ImportError:
|
| 54 |
+
from transformers.modeling_attn_mask_utils import _prepare_4d_attention_mask
|
| 55 |
+
|
| 56 |
+
_HAS_NATIVE_BIDIRECTIONAL_MASK = False
|
| 57 |
+
|
| 58 |
+
# Detect API differences via introspection
|
| 59 |
+
_decoder_forward_params = inspect.signature(LlamaDecoderLayer.forward).parameters
|
| 60 |
+
_dynamic_cache_init_params = inspect.signature(DynamicCache.__init__).parameters
|
| 61 |
+
|
| 62 |
+
# past_key_value (singular) in < 4.56, past_key_values (plural) in >= 4.56
|
| 63 |
+
_USE_PLURAL_CACHE_PARAM = "past_key_values" in _decoder_forward_params
|
| 64 |
+
# DynamicCache accepts config parameter in >= 4.56
|
| 65 |
+
_DYNAMIC_CACHE_ACCEPTS_CONFIG = "config" in _dynamic_cache_init_params
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
class LlamaBidirectionalConfig(LlamaConfig):
|
| 69 |
+
"""Configuration for LlamaBidirectionalModel with pooling and temperature settings."""
|
| 70 |
+
|
| 71 |
+
model_type = "llama_bidirec"
|
| 72 |
+
|
| 73 |
+
def __init__(
|
| 74 |
+
self, pooling: str = "avg", temperature: float = 1.0, **kwargs
|
| 75 |
+
) -> None:
|
| 76 |
+
"""
|
| 77 |
+
Initialize bidirectional Llama configuration.
|
| 78 |
+
|
| 79 |
+
Args:
|
| 80 |
+
pooling: Pooling strategy for embeddings ("avg", "cls", "last", etc.)
|
| 81 |
+
temperature: Temperature scaling for embeddings
|
| 82 |
+
**kwargs: Additional arguments passed to LlamaConfig
|
| 83 |
+
"""
|
| 84 |
+
self.pooling = pooling
|
| 85 |
+
self.temperature = temperature
|
| 86 |
+
super().__init__(**kwargs)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
class LlamaBidirectionalModel(LlamaModel):
|
| 90 |
+
"""
|
| 91 |
+
LlamaModel modified to use bidirectional (non-causal) attention.
|
| 92 |
+
|
| 93 |
+
In standard Llama, each token can only attend to previous tokens (causal attention).
|
| 94 |
+
This model removes that restriction, allowing each token to attend to all tokens
|
| 95 |
+
in the sequence, which is useful for embedding tasks.
|
| 96 |
+
|
| 97 |
+
The key modifications are:
|
| 98 |
+
1. Setting is_causal=False on all attention layers
|
| 99 |
+
2. Using a bidirectional attention mask instead of causal mask
|
| 100 |
+
"""
|
| 101 |
+
|
| 102 |
+
config_class = LlamaBidirectionalConfig
|
| 103 |
+
|
| 104 |
+
def __init__(self, config: LlamaConfig) -> None:
|
| 105 |
+
super().__init__(config)
|
| 106 |
+
for layer in self.layers:
|
| 107 |
+
layer.self_attn.is_causal = False
|
| 108 |
+
|
| 109 |
+
def _create_bidirectional_mask(
|
| 110 |
+
self,
|
| 111 |
+
input_embeds: torch.Tensor,
|
| 112 |
+
attention_mask: torch.Tensor | None,
|
| 113 |
+
) -> torch.Tensor | None:
|
| 114 |
+
"""
|
| 115 |
+
Create bidirectional attention mask.
|
| 116 |
+
|
| 117 |
+
Args:
|
| 118 |
+
input_embeds: Input embeddings tensor of shape (batch_size, seq_len, hidden_size)
|
| 119 |
+
attention_mask: Optional 2D attention mask of shape (batch_size, seq_len)
|
| 120 |
+
where 1 indicates tokens to attend to and 0 indicates masked tokens
|
| 121 |
+
|
| 122 |
+
Returns:
|
| 123 |
+
4D attention mask suitable for the attention implementation, or None
|
| 124 |
+
if no masking is needed
|
| 125 |
+
"""
|
| 126 |
+
if attention_mask is None:
|
| 127 |
+
return None
|
| 128 |
+
|
| 129 |
+
if _HAS_NATIVE_BIDIRECTIONAL_MASK:
|
| 130 |
+
return create_bidirectional_mask(
|
| 131 |
+
config=self.config,
|
| 132 |
+
input_embeds=input_embeds,
|
| 133 |
+
attention_mask=attention_mask,
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
+
# Fallback for transformers < 5.0 without create_bidirectional_mask
|
| 137 |
+
|
| 138 |
+
# Flash attention handles 2D masks internally; only pass mask if there
|
| 139 |
+
# are actually masked tokens (zeros), otherwise return None for efficiency
|
| 140 |
+
if getattr(self.config, "_attn_implementation", None) == "flash_attention_2":
|
| 141 |
+
has_masked_tokens = (attention_mask == 0).any()
|
| 142 |
+
return attention_mask if has_masked_tokens else None
|
| 143 |
+
|
| 144 |
+
return _prepare_4d_attention_mask(attention_mask, input_embeds.dtype)
|
| 145 |
+
|
| 146 |
+
def forward(
|
| 147 |
+
self,
|
| 148 |
+
input_ids: torch.LongTensor | None = None,
|
| 149 |
+
attention_mask: torch.Tensor | None = None,
|
| 150 |
+
position_ids: torch.LongTensor | None = None,
|
| 151 |
+
past_key_values: Cache | None = None,
|
| 152 |
+
inputs_embeds: torch.FloatTensor | None = None,
|
| 153 |
+
cache_position: torch.LongTensor | None = None,
|
| 154 |
+
use_cache: bool | None = None,
|
| 155 |
+
**kwargs,
|
| 156 |
+
) -> BaseModelOutputWithPast:
|
| 157 |
+
"""
|
| 158 |
+
Forward pass with bidirectional attention.
|
| 159 |
+
|
| 160 |
+
Args:
|
| 161 |
+
input_ids: Input token IDs of shape (batch_size, seq_len)
|
| 162 |
+
attention_mask: Attention mask of shape (batch_size, seq_len)
|
| 163 |
+
position_ids: Position IDs for rotary embeddings
|
| 164 |
+
past_key_values: Cached key/value states for incremental decoding
|
| 165 |
+
inputs_embeds: Pre-computed input embeddings (alternative to input_ids)
|
| 166 |
+
cache_position: Position indices for cache updates
|
| 167 |
+
use_cache: Whether to return cached key/value states
|
| 168 |
+
**kwargs: Additional arguments passed to decoder layers
|
| 169 |
+
|
| 170 |
+
Returns:
|
| 171 |
+
BaseModelOutputWithPast containing last_hidden_state and past_key_values
|
| 172 |
+
"""
|
| 173 |
+
if (input_ids is None) ^ (inputs_embeds is not None):
|
| 174 |
+
raise ValueError(
|
| 175 |
+
"You must specify exactly one of input_ids or inputs_embeds"
|
| 176 |
+
)
|
| 177 |
+
|
| 178 |
+
if inputs_embeds is None:
|
| 179 |
+
inputs_embeds = self.embed_tokens(input_ids)
|
| 180 |
+
|
| 181 |
+
# Initialize cache if needed
|
| 182 |
+
if use_cache and past_key_values is None:
|
| 183 |
+
if _DYNAMIC_CACHE_ACCEPTS_CONFIG:
|
| 184 |
+
past_key_values = DynamicCache(config=self.config)
|
| 185 |
+
else:
|
| 186 |
+
past_key_values = DynamicCache()
|
| 187 |
+
|
| 188 |
+
if cache_position is None:
|
| 189 |
+
past_seen_tokens = (
|
| 190 |
+
past_key_values.get_seq_length() if past_key_values is not None else 0
|
| 191 |
+
)
|
| 192 |
+
cache_position = torch.arange(
|
| 193 |
+
past_seen_tokens,
|
| 194 |
+
past_seen_tokens + inputs_embeds.shape[1],
|
| 195 |
+
device=inputs_embeds.device,
|
| 196 |
+
)
|
| 197 |
+
|
| 198 |
+
if position_ids is None:
|
| 199 |
+
position_ids = cache_position.unsqueeze(0)
|
| 200 |
+
|
| 201 |
+
bidirectional_mask = self._create_bidirectional_mask(
|
| 202 |
+
inputs_embeds, attention_mask
|
| 203 |
+
)
|
| 204 |
+
|
| 205 |
+
hidden_states = inputs_embeds
|
| 206 |
+
position_embeddings = self.rotary_emb(hidden_states, position_ids)
|
| 207 |
+
|
| 208 |
+
# Build decoder layer kwargs with correct cache parameter name
|
| 209 |
+
# (past_key_value in < 4.56, past_key_values in >= 4.56)
|
| 210 |
+
layer_kwargs = {
|
| 211 |
+
"attention_mask": bidirectional_mask,
|
| 212 |
+
"position_ids": position_ids,
|
| 213 |
+
"use_cache": use_cache,
|
| 214 |
+
"cache_position": cache_position,
|
| 215 |
+
"position_embeddings": position_embeddings,
|
| 216 |
+
}
|
| 217 |
+
if _USE_PLURAL_CACHE_PARAM:
|
| 218 |
+
layer_kwargs["past_key_values"] = past_key_values
|
| 219 |
+
else:
|
| 220 |
+
layer_kwargs["past_key_value"] = past_key_values
|
| 221 |
+
|
| 222 |
+
for decoder_layer in self.layers[: self.config.num_hidden_layers]:
|
| 223 |
+
layer_outputs = decoder_layer(hidden_states, **layer_kwargs)
|
| 224 |
+
|
| 225 |
+
# Decoder returns tuple in < 4.54, tensor in >= 4.54
|
| 226 |
+
if isinstance(layer_outputs, tuple):
|
| 227 |
+
hidden_states = layer_outputs[0]
|
| 228 |
+
else:
|
| 229 |
+
hidden_states = layer_outputs
|
| 230 |
+
|
| 231 |
+
hidden_states = self.norm(hidden_states)
|
| 232 |
+
|
| 233 |
+
return BaseModelOutputWithPast(
|
| 234 |
+
last_hidden_state=hidden_states,
|
| 235 |
+
past_key_values=past_key_values,
|
| 236 |
+
)
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
def pool(
|
| 240 |
+
last_hidden_states: torch.Tensor, attention_mask: torch.Tensor, pool_type: str
|
| 241 |
+
) -> torch.Tensor:
|
| 242 |
+
last_hidden = last_hidden_states.masked_fill(~attention_mask[..., None].bool(), 0.0)
|
| 243 |
+
|
| 244 |
+
if pool_type == "avg":
|
| 245 |
+
emb = last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]
|
| 246 |
+
elif pool_type == "weighted_avg":
|
| 247 |
+
emb = last_hidden.sum(dim=1)
|
| 248 |
+
elif pool_type == "cls":
|
| 249 |
+
emb = last_hidden[:, 0]
|
| 250 |
+
elif pool_type == "last":
|
| 251 |
+
left_padding = attention_mask[:, -1].sum() == attention_mask.shape[0]
|
| 252 |
+
if left_padding:
|
| 253 |
+
emb = last_hidden[:, -1]
|
| 254 |
+
else:
|
| 255 |
+
sequence_lengths = attention_mask.sum(dim=1) - 1
|
| 256 |
+
batch_size = last_hidden.shape[0]
|
| 257 |
+
emb = last_hidden[
|
| 258 |
+
torch.arange(batch_size, device=last_hidden.device), sequence_lengths
|
| 259 |
+
]
|
| 260 |
+
else:
|
| 261 |
+
raise ValueError(f"pool_type {pool_type} not supported")
|
| 262 |
+
|
| 263 |
+
return emb
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
class LlamaBidirectionalForSequenceClassification(LlamaPreTrainedModel):
|
| 267 |
+
config_class = LlamaBidirectionalConfig
|
| 268 |
+
|
| 269 |
+
def __init__(self, config):
|
| 270 |
+
super().__init__(config)
|
| 271 |
+
self.num_labels = config.num_labels
|
| 272 |
+
self.score = nn.Linear(config.hidden_size, self.num_labels, bias=False)
|
| 273 |
+
self.model = LlamaBidirectionalModel(config)
|
| 274 |
+
|
| 275 |
+
# Initialize weights and apply final processing
|
| 276 |
+
self.post_init()
|
| 277 |
+
|
| 278 |
+
def forward(
|
| 279 |
+
self,
|
| 280 |
+
input_ids: Optional[torch.LongTensor] = None,
|
| 281 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 282 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 283 |
+
past_key_values: Optional[Union[Cache, List[torch.FloatTensor]]] = None,
|
| 284 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 285 |
+
labels: Optional[torch.LongTensor] = None,
|
| 286 |
+
use_cache: Optional[bool] = None,
|
| 287 |
+
output_attentions: Optional[bool] = None,
|
| 288 |
+
output_hidden_states: Optional[bool] = None,
|
| 289 |
+
return_dict: Optional[bool] = None,
|
| 290 |
+
**kwargs,
|
| 291 |
+
) -> Union[Tuple, SequenceClassifierOutputWithPast]:
|
| 292 |
+
r"""
|
| 293 |
+
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
|
| 294 |
+
Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
|
| 295 |
+
config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
|
| 296 |
+
`config.num_labels > 1` a classification loss is computed (Cross-Entropy).
|
| 297 |
+
"""
|
| 298 |
+
return_dict = (
|
| 299 |
+
return_dict if return_dict is not None else self.config.use_return_dict
|
| 300 |
+
)
|
| 301 |
+
|
| 302 |
+
transformer_outputs = self.model(
|
| 303 |
+
input_ids,
|
| 304 |
+
attention_mask=attention_mask,
|
| 305 |
+
position_ids=position_ids,
|
| 306 |
+
past_key_values=past_key_values,
|
| 307 |
+
inputs_embeds=inputs_embeds,
|
| 308 |
+
use_cache=use_cache,
|
| 309 |
+
output_attentions=output_attentions,
|
| 310 |
+
output_hidden_states=output_hidden_states,
|
| 311 |
+
return_dict=return_dict,
|
| 312 |
+
**kwargs,
|
| 313 |
+
)
|
| 314 |
+
hidden_states = transformer_outputs[0]
|
| 315 |
+
|
| 316 |
+
pooled_hidden_states = pool(
|
| 317 |
+
last_hidden_states=hidden_states,
|
| 318 |
+
attention_mask=attention_mask,
|
| 319 |
+
pool_type=self.config.pooling,
|
| 320 |
+
)
|
| 321 |
+
|
| 322 |
+
pooled_logits = self.score(pooled_hidden_states)
|
| 323 |
+
pooled_logits = pooled_logits / self.config.temperature
|
| 324 |
+
|
| 325 |
+
loss = None
|
| 326 |
+
if labels is not None:
|
| 327 |
+
labels = labels.to(pooled_logits.device)
|
| 328 |
+
if self.config.problem_type is None:
|
| 329 |
+
if self.num_labels == 1:
|
| 330 |
+
self.config.problem_type = "regression"
|
| 331 |
+
elif self.num_labels > 1 and (
|
| 332 |
+
labels.dtype == torch.long or labels.dtype == torch.int
|
| 333 |
+
):
|
| 334 |
+
self.config.problem_type = "single_label_classification"
|
| 335 |
+
else:
|
| 336 |
+
self.config.problem_type = "multi_label_classification"
|
| 337 |
+
|
| 338 |
+
if self.config.problem_type == "regression":
|
| 339 |
+
loss_fct = MSELoss()
|
| 340 |
+
if self.num_labels == 1:
|
| 341 |
+
loss = loss_fct(pooled_logits.squeeze(), labels.squeeze())
|
| 342 |
+
else:
|
| 343 |
+
loss = loss_fct(pooled_logits, labels)
|
| 344 |
+
elif self.config.problem_type == "single_label_classification":
|
| 345 |
+
loss_fct = CrossEntropyLoss()
|
| 346 |
+
loss = loss_fct(
|
| 347 |
+
pooled_logits.view(-1, self.num_labels), labels.view(-1)
|
| 348 |
+
)
|
| 349 |
+
elif self.config.problem_type == "multi_label_classification":
|
| 350 |
+
loss_fct = BCEWithLogitsLoss()
|
| 351 |
+
loss = loss_fct(pooled_logits, labels)
|
| 352 |
+
if not return_dict:
|
| 353 |
+
output = (pooled_logits,) + transformer_outputs[1:]
|
| 354 |
+
return ((loss,) + output) if loss is not None else output
|
| 355 |
+
|
| 356 |
+
return SequenceClassifierOutputWithPast(
|
| 357 |
+
loss=loss,
|
| 358 |
+
logits=pooled_logits,
|
| 359 |
+
past_key_values=transformer_outputs.past_key_values,
|
| 360 |
+
hidden_states=transformer_outputs.hidden_states,
|
| 361 |
+
attentions=transformer_outputs.attentions,
|
| 362 |
+
)
|
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d7ff6ae8ef3212cebe4264b9de6cb71603f1f4cb1bd7e860631c94e38a44df8
|
| 3 |
+
size 2471649792
|
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/ranx_results.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "nvidia-llama-nemotron-rerank-1b-v2",
|
| 3 |
+
"val_files": [
|
| 4 |
+
"../../data/val_data/13B1_golden.json",
|
| 5 |
+
"../../data/val_data/13B2_golden.json"
|
| 6 |
+
],
|
| 7 |
+
"total": {
|
| 8 |
+
"ndcg@5": 0.9978289985504203,
|
| 9 |
+
"mrr": 0.9970588235294118,
|
| 10 |
+
"recall@10": 0.6594908184294858,
|
| 11 |
+
"recall@100": 1.0,
|
| 12 |
+
"map@10": 0.6564445999420908,
|
| 13 |
+
"map-bioasq@10": 0.996953781512605
|
| 14 |
+
},
|
| 15 |
+
"13B1_golden.json": {
|
| 16 |
+
"ndcg@5": 0.9956579971008406,
|
| 17 |
+
"mrr": 0.9941176470588236,
|
| 18 |
+
"recall@10": 0.7100945834410882,
|
| 19 |
+
"recall@100": 1.0,
|
| 20 |
+
"map@10": 0.7040021464662983,
|
| 21 |
+
"map-bioasq@10": 0.9939075630252101
|
| 22 |
+
},
|
| 23 |
+
"13B2_golden.json": {
|
| 24 |
+
"ndcg@5": 1.0,
|
| 25 |
+
"mrr": 1.0,
|
| 26 |
+
"recall@10": 0.6088870534178833,
|
| 27 |
+
"recall@100": 1.0,
|
| 28 |
+
"map@10": 0.6088870534178833,
|
| 29 |
+
"map-bioasq@10": 1.0
|
| 30 |
+
}
|
| 31 |
+
}
|
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c85066e7642934ed09b44155e6566b0b5dab2637fb9433439ba5c9c7f8b50d3
|
| 3 |
+
size 17210018
|
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/tokenizer_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|begin_of_text|>",
|
| 4 |
+
"clean_up_tokenization_spaces": true,
|
| 5 |
+
"eos_token": "<|end_of_text|>",
|
| 6 |
+
"is_local": false,
|
| 7 |
+
"model_input_names": [
|
| 8 |
+
"input_ids",
|
| 9 |
+
"attention_mask"
|
| 10 |
+
],
|
| 11 |
+
"model_max_length": 4096,
|
| 12 |
+
"pad_token": "<|end_of_text|>",
|
| 13 |
+
"tok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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_global_step": null,
|
| 3 |
+
"best_metric": null,
|
| 4 |
+
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 2.0,
|
| 6 |
+
"eval_steps": 500,
|
| 7 |
+
"global_step": 5098,
|
| 8 |
+
"is_hyper_param_search": false,
|
| 9 |
+
"is_local_process_zero": true,
|
| 10 |
+
"is_world_process_zero": true,
|
| 11 |
+
"log_history": [
|
| 12 |
+
{
|
| 13 |
+
"epoch": 0.019615535504119264,
|
| 14 |
+
"grad_norm": 0.0,
|
| 15 |
+
"learning_rate": 9.903883876029816e-05,
|
| 16 |
+
"loss": 0.20531219482421875,
|
| 17 |
+
"step": 50
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"epoch": 0.03923107100823853,
|
| 21 |
+
"grad_norm": 0.0,
|
| 22 |
+
"learning_rate": 9.805806198509219e-05,
|
| 23 |
+
"loss": 0.008828125,
|
| 24 |
+
"step": 100
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"epoch": 0.05884660651235779,
|
| 28 |
+
"grad_norm": 6.46875,
|
| 29 |
+
"learning_rate": 9.707728520988623e-05,
|
| 30 |
+
"loss": 0.3015625,
|
| 31 |
+
"step": 150
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 0.07846214201647705,
|
| 35 |
+
"grad_norm": 13.875,
|
| 36 |
+
"learning_rate": 9.609650843468027e-05,
|
| 37 |
+
"loss": 0.330703125,
|
| 38 |
+
"step": 200
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 0.09807767752059632,
|
| 42 |
+
"grad_norm": 0.0,
|
| 43 |
+
"learning_rate": 9.51157316594743e-05,
|
| 44 |
+
"loss": 0.0034375,
|
| 45 |
+
"step": 250
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 0.11769321302471558,
|
| 49 |
+
"grad_norm": 0.0,
|
| 50 |
+
"learning_rate": 9.413495488426834e-05,
|
| 51 |
+
"loss": 0.0003125,
|
| 52 |
+
"step": 300
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"epoch": 0.13730874852883485,
|
| 56 |
+
"grad_norm": 0.0,
|
| 57 |
+
"learning_rate": 9.315417810906238e-05,
|
| 58 |
+
"loss": 0.0015625,
|
| 59 |
+
"step": 350
|
| 60 |
+
},
|
| 61 |
+
{
|
| 62 |
+
"epoch": 0.1569242840329541,
|
| 63 |
+
"grad_norm": 0.0,
|
| 64 |
+
"learning_rate": 9.217340133385642e-05,
|
| 65 |
+
"loss": 0.00125,
|
| 66 |
+
"step": 400
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"epoch": 0.17653981953707337,
|
| 70 |
+
"grad_norm": 0.0,
|
| 71 |
+
"learning_rate": 9.119262455865045e-05,
|
| 72 |
+
"loss": 0.000625,
|
| 73 |
+
"step": 450
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"epoch": 0.19615535504119264,
|
| 77 |
+
"grad_norm": 0.0,
|
| 78 |
+
"learning_rate": 9.021184778344449e-05,
|
| 79 |
+
"loss": 0.0103125,
|
| 80 |
+
"step": 500
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"epoch": 0.2157708905453119,
|
| 84 |
+
"grad_norm": 0.0,
|
| 85 |
+
"learning_rate": 8.923107100823853e-05,
|
| 86 |
+
"loss": 0.0,
|
| 87 |
+
"step": 550
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"epoch": 0.23538642604943116,
|
| 91 |
+
"grad_norm": 0.0,
|
| 92 |
+
"learning_rate": 8.825029423303257e-05,
|
| 93 |
+
"loss": 0.0,
|
| 94 |
+
"step": 600
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"epoch": 0.2550019615535504,
|
| 98 |
+
"grad_norm": 0.0,
|
| 99 |
+
"learning_rate": 8.72695174578266e-05,
|
| 100 |
+
"loss": 0.0,
|
| 101 |
+
"step": 650
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"epoch": 0.2746174970576697,
|
| 105 |
+
"grad_norm": 0.0,
|
| 106 |
+
"learning_rate": 8.628874068262064e-05,
|
| 107 |
+
"loss": 0.0,
|
| 108 |
+
"step": 700
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"epoch": 0.29423303256178895,
|
| 112 |
+
"grad_norm": 0.0,
|
| 113 |
+
"learning_rate": 8.530796390741468e-05,
|
| 114 |
+
"loss": 0.0,
|
| 115 |
+
"step": 750
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"epoch": 0.3138485680659082,
|
| 119 |
+
"grad_norm": 0.0,
|
| 120 |
+
"learning_rate": 8.432718713220872e-05,
|
| 121 |
+
"loss": 0.0,
|
| 122 |
+
"step": 800
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"epoch": 0.3334641035700275,
|
| 126 |
+
"grad_norm": 0.0,
|
| 127 |
+
"learning_rate": 8.334641035700274e-05,
|
| 128 |
+
"loss": 0.0,
|
| 129 |
+
"step": 850
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"epoch": 0.35307963907414674,
|
| 133 |
+
"grad_norm": 0.0,
|
| 134 |
+
"learning_rate": 8.236563358179678e-05,
|
| 135 |
+
"loss": 0.0034375,
|
| 136 |
+
"step": 900
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"epoch": 0.372695174578266,
|
| 140 |
+
"grad_norm": 0.0,
|
| 141 |
+
"learning_rate": 8.138485680659082e-05,
|
| 142 |
+
"loss": 0.0,
|
| 143 |
+
"step": 950
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"epoch": 0.39231071008238527,
|
| 147 |
+
"grad_norm": 0.0,
|
| 148 |
+
"learning_rate": 8.040408003138486e-05,
|
| 149 |
+
"loss": 0.0003125,
|
| 150 |
+
"step": 1000
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"epoch": 0.41192624558650454,
|
| 154 |
+
"grad_norm": 0.0,
|
| 155 |
+
"learning_rate": 7.942330325617889e-05,
|
| 156 |
+
"loss": 0.0,
|
| 157 |
+
"step": 1050
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"epoch": 0.4315417810906238,
|
| 161 |
+
"grad_norm": 0.0,
|
| 162 |
+
"learning_rate": 7.844252648097293e-05,
|
| 163 |
+
"loss": 0.0,
|
| 164 |
+
"step": 1100
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"epoch": 0.45115731659474306,
|
| 168 |
+
"grad_norm": 0.0,
|
| 169 |
+
"learning_rate": 7.746174970576697e-05,
|
| 170 |
+
"loss": 0.0,
|
| 171 |
+
"step": 1150
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"epoch": 0.4707728520988623,
|
| 175 |
+
"grad_norm": 0.0,
|
| 176 |
+
"learning_rate": 7.648097293056101e-05,
|
| 177 |
+
"loss": 0.0028125,
|
| 178 |
+
"step": 1200
|
| 179 |
+
},
|
| 180 |
+
{
|
| 181 |
+
"epoch": 0.49038838760298153,
|
| 182 |
+
"grad_norm": 0.0,
|
| 183 |
+
"learning_rate": 7.550019615535504e-05,
|
| 184 |
+
"loss": 0.0,
|
| 185 |
+
"step": 1250
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"epoch": 0.5100039231071009,
|
| 189 |
+
"grad_norm": 0.0,
|
| 190 |
+
"learning_rate": 7.451941938014908e-05,
|
| 191 |
+
"loss": 0.0,
|
| 192 |
+
"step": 1300
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"epoch": 0.5296194586112201,
|
| 196 |
+
"grad_norm": 0.0,
|
| 197 |
+
"learning_rate": 7.353864260494312e-05,
|
| 198 |
+
"loss": 0.0,
|
| 199 |
+
"step": 1350
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"epoch": 0.5492349941153394,
|
| 203 |
+
"grad_norm": 0.0,
|
| 204 |
+
"learning_rate": 7.255786582973716e-05,
|
| 205 |
+
"loss": 0.0,
|
| 206 |
+
"step": 1400
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"epoch": 0.5688505296194586,
|
| 210 |
+
"grad_norm": 0.0,
|
| 211 |
+
"learning_rate": 7.157708905453119e-05,
|
| 212 |
+
"loss": 0.0,
|
| 213 |
+
"step": 1450
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"epoch": 0.5884660651235779,
|
| 217 |
+
"grad_norm": 0.0,
|
| 218 |
+
"learning_rate": 7.059631227932523e-05,
|
| 219 |
+
"loss": 0.0,
|
| 220 |
+
"step": 1500
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"epoch": 0.6080816006276971,
|
| 224 |
+
"grad_norm": 0.0,
|
| 225 |
+
"learning_rate": 6.961553550411927e-05,
|
| 226 |
+
"loss": 0.0,
|
| 227 |
+
"step": 1550
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"epoch": 0.6276971361318164,
|
| 231 |
+
"grad_norm": 0.0,
|
| 232 |
+
"learning_rate": 6.863475872891331e-05,
|
| 233 |
+
"loss": 0.0,
|
| 234 |
+
"step": 1600
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"epoch": 0.6473126716359356,
|
| 238 |
+
"grad_norm": 0.0,
|
| 239 |
+
"learning_rate": 6.765398195370734e-05,
|
| 240 |
+
"loss": 0.0,
|
| 241 |
+
"step": 1650
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"epoch": 0.666928207140055,
|
| 245 |
+
"grad_norm": 0.0,
|
| 246 |
+
"learning_rate": 6.667320517850138e-05,
|
| 247 |
+
"loss": 0.0,
|
| 248 |
+
"step": 1700
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"epoch": 0.6865437426441742,
|
| 252 |
+
"grad_norm": 0.0,
|
| 253 |
+
"learning_rate": 6.569242840329542e-05,
|
| 254 |
+
"loss": 0.0,
|
| 255 |
+
"step": 1750
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"epoch": 0.7061592781482935,
|
| 259 |
+
"grad_norm": 0.0,
|
| 260 |
+
"learning_rate": 6.471165162808946e-05,
|
| 261 |
+
"loss": 0.0,
|
| 262 |
+
"step": 1800
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"epoch": 0.7257748136524127,
|
| 266 |
+
"grad_norm": 0.0,
|
| 267 |
+
"learning_rate": 6.373087485288348e-05,
|
| 268 |
+
"loss": 0.0,
|
| 269 |
+
"step": 1850
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"epoch": 0.745390349156532,
|
| 273 |
+
"grad_norm": 0.0,
|
| 274 |
+
"learning_rate": 6.275009807767752e-05,
|
| 275 |
+
"loss": 0.004375,
|
| 276 |
+
"step": 1900
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"epoch": 0.7650058846606512,
|
| 280 |
+
"grad_norm": 0.0,
|
| 281 |
+
"learning_rate": 6.176932130247156e-05,
|
| 282 |
+
"loss": 0.0009375,
|
| 283 |
+
"step": 1950
|
| 284 |
+
},
|
| 285 |
+
{
|
| 286 |
+
"epoch": 0.7846214201647705,
|
| 287 |
+
"grad_norm": 0.0,
|
| 288 |
+
"learning_rate": 6.07885445272656e-05,
|
| 289 |
+
"loss": 0.0,
|
| 290 |
+
"step": 2000
|
| 291 |
+
},
|
| 292 |
+
{
|
| 293 |
+
"epoch": 0.8042369556688898,
|
| 294 |
+
"grad_norm": 0.0,
|
| 295 |
+
"learning_rate": 5.980776775205963e-05,
|
| 296 |
+
"loss": 0.0,
|
| 297 |
+
"step": 2050
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"epoch": 0.8238524911730091,
|
| 301 |
+
"grad_norm": 0.0,
|
| 302 |
+
"learning_rate": 5.8826990976853666e-05,
|
| 303 |
+
"loss": 0.00078125,
|
| 304 |
+
"step": 2100
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"epoch": 0.8434680266771283,
|
| 308 |
+
"grad_norm": 0.0,
|
| 309 |
+
"learning_rate": 5.7846214201647706e-05,
|
| 310 |
+
"loss": 0.0,
|
| 311 |
+
"step": 2150
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"epoch": 0.8630835621812476,
|
| 315 |
+
"grad_norm": 0.0,
|
| 316 |
+
"learning_rate": 5.6865437426441747e-05,
|
| 317 |
+
"loss": 0.0,
|
| 318 |
+
"step": 2200
|
| 319 |
+
},
|
| 320 |
+
{
|
| 321 |
+
"epoch": 0.8826990976853668,
|
| 322 |
+
"grad_norm": 0.0,
|
| 323 |
+
"learning_rate": 5.5884660651235773e-05,
|
| 324 |
+
"loss": 0.0,
|
| 325 |
+
"step": 2250
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"epoch": 0.9023146331894861,
|
| 329 |
+
"grad_norm": 0.0,
|
| 330 |
+
"learning_rate": 5.4903883876029814e-05,
|
| 331 |
+
"loss": 0.0,
|
| 332 |
+
"step": 2300
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"epoch": 0.9219301686936053,
|
| 336 |
+
"grad_norm": 0.0,
|
| 337 |
+
"learning_rate": 5.3923107100823854e-05,
|
| 338 |
+
"loss": 0.0,
|
| 339 |
+
"step": 2350
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"epoch": 0.9415457041977247,
|
| 343 |
+
"grad_norm": 0.0,
|
| 344 |
+
"learning_rate": 5.2942330325617895e-05,
|
| 345 |
+
"loss": 0.00125,
|
| 346 |
+
"step": 2400
|
| 347 |
+
},
|
| 348 |
+
{
|
| 349 |
+
"epoch": 0.9611612397018439,
|
| 350 |
+
"grad_norm": 0.0,
|
| 351 |
+
"learning_rate": 5.196155355041192e-05,
|
| 352 |
+
"loss": 0.0,
|
| 353 |
+
"step": 2450
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"epoch": 0.9807767752059631,
|
| 357 |
+
"grad_norm": 0.0,
|
| 358 |
+
"learning_rate": 5.098077677520596e-05,
|
| 359 |
+
"loss": 0.0,
|
| 360 |
+
"step": 2500
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"epoch": 1.0,
|
| 364 |
+
"eval_loss": 0.0,
|
| 365 |
+
"eval_runtime": 4.9531,
|
| 366 |
+
"eval_samples_per_second": 33.918,
|
| 367 |
+
"eval_steps_per_second": 1.211,
|
| 368 |
+
"step": 2549
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"epoch": 1.0003923107100823,
|
| 372 |
+
"grad_norm": 0.0,
|
| 373 |
+
"learning_rate": 5e-05,
|
| 374 |
+
"loss": 0.0,
|
| 375 |
+
"step": 2550
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"epoch": 1.0200078462142017,
|
| 379 |
+
"grad_norm": 0.0,
|
| 380 |
+
"learning_rate": 4.901922322479404e-05,
|
| 381 |
+
"loss": 0.0,
|
| 382 |
+
"step": 2600
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"epoch": 1.039623381718321,
|
| 386 |
+
"grad_norm": 0.0,
|
| 387 |
+
"learning_rate": 4.8038446449588076e-05,
|
| 388 |
+
"loss": 0.0,
|
| 389 |
+
"step": 2650
|
| 390 |
+
},
|
| 391 |
+
{
|
| 392 |
+
"epoch": 1.0592389172224401,
|
| 393 |
+
"grad_norm": 0.0,
|
| 394 |
+
"learning_rate": 4.705766967438212e-05,
|
| 395 |
+
"loss": 0.0,
|
| 396 |
+
"step": 2700
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"epoch": 1.0788544527265593,
|
| 400 |
+
"grad_norm": 0.0,
|
| 401 |
+
"learning_rate": 4.607689289917615e-05,
|
| 402 |
+
"loss": 0.0,
|
| 403 |
+
"step": 2750
|
| 404 |
+
},
|
| 405 |
+
{
|
| 406 |
+
"epoch": 1.0984699882306788,
|
| 407 |
+
"grad_norm": 0.0,
|
| 408 |
+
"learning_rate": 4.509611612397019e-05,
|
| 409 |
+
"loss": 0.0,
|
| 410 |
+
"step": 2800
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"epoch": 1.118085523734798,
|
| 414 |
+
"grad_norm": 0.0,
|
| 415 |
+
"learning_rate": 4.4115339348764225e-05,
|
| 416 |
+
"loss": 0.0,
|
| 417 |
+
"step": 2850
|
| 418 |
+
},
|
| 419 |
+
{
|
| 420 |
+
"epoch": 1.1377010592389172,
|
| 421 |
+
"grad_norm": 0.0,
|
| 422 |
+
"learning_rate": 4.3134562573558265e-05,
|
| 423 |
+
"loss": 0.0,
|
| 424 |
+
"step": 2900
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"epoch": 1.1573165947430364,
|
| 428 |
+
"grad_norm": 0.0,
|
| 429 |
+
"learning_rate": 4.21537857983523e-05,
|
| 430 |
+
"loss": 0.0,
|
| 431 |
+
"step": 2950
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"epoch": 1.1769321302471558,
|
| 435 |
+
"grad_norm": 0.0,
|
| 436 |
+
"learning_rate": 4.117300902314634e-05,
|
| 437 |
+
"loss": 0.0,
|
| 438 |
+
"step": 3000
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"epoch": 1.196547665751275,
|
| 442 |
+
"grad_norm": 0.0,
|
| 443 |
+
"learning_rate": 4.019223224794037e-05,
|
| 444 |
+
"loss": 0.0,
|
| 445 |
+
"step": 3050
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"epoch": 1.2161632012553942,
|
| 449 |
+
"grad_norm": 0.0,
|
| 450 |
+
"learning_rate": 3.9211455472734406e-05,
|
| 451 |
+
"loss": 0.0,
|
| 452 |
+
"step": 3100
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"epoch": 1.2357787367595134,
|
| 456 |
+
"grad_norm": 0.0,
|
| 457 |
+
"learning_rate": 3.823067869752845e-05,
|
| 458 |
+
"loss": 0.0,
|
| 459 |
+
"step": 3150
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"epoch": 1.2553942722636329,
|
| 463 |
+
"grad_norm": 0.0,
|
| 464 |
+
"learning_rate": 3.724990192232248e-05,
|
| 465 |
+
"loss": 0.0,
|
| 466 |
+
"step": 3200
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"epoch": 1.275009807767752,
|
| 470 |
+
"grad_norm": 0.0,
|
| 471 |
+
"learning_rate": 3.6269125147116514e-05,
|
| 472 |
+
"loss": 0.00046875,
|
| 473 |
+
"step": 3250
|
| 474 |
+
},
|
| 475 |
+
{
|
| 476 |
+
"epoch": 1.2946253432718713,
|
| 477 |
+
"grad_norm": 0.0,
|
| 478 |
+
"learning_rate": 3.5288348371910554e-05,
|
| 479 |
+
"loss": 0.0,
|
| 480 |
+
"step": 3300
|
| 481 |
+
},
|
| 482 |
+
{
|
| 483 |
+
"epoch": 1.3142408787759905,
|
| 484 |
+
"grad_norm": 0.0,
|
| 485 |
+
"learning_rate": 3.430757159670459e-05,
|
| 486 |
+
"loss": 0.0,
|
| 487 |
+
"step": 3350
|
| 488 |
+
},
|
| 489 |
+
{
|
| 490 |
+
"epoch": 1.33385641428011,
|
| 491 |
+
"grad_norm": 0.0,
|
| 492 |
+
"learning_rate": 3.332679482149863e-05,
|
| 493 |
+
"loss": 0.0,
|
| 494 |
+
"step": 3400
|
| 495 |
+
},
|
| 496 |
+
{
|
| 497 |
+
"epoch": 1.3534719497842291,
|
| 498 |
+
"grad_norm": 0.0,
|
| 499 |
+
"learning_rate": 3.234601804629266e-05,
|
| 500 |
+
"loss": 0.0,
|
| 501 |
+
"step": 3450
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"epoch": 1.3730874852883483,
|
| 505 |
+
"grad_norm": 0.0,
|
| 506 |
+
"learning_rate": 3.13652412710867e-05,
|
| 507 |
+
"loss": 0.0,
|
| 508 |
+
"step": 3500
|
| 509 |
+
},
|
| 510 |
+
{
|
| 511 |
+
"epoch": 1.3927030207924678,
|
| 512 |
+
"grad_norm": 0.0,
|
| 513 |
+
"learning_rate": 3.0384464495880736e-05,
|
| 514 |
+
"loss": 0.0,
|
| 515 |
+
"step": 3550
|
| 516 |
+
},
|
| 517 |
+
{
|
| 518 |
+
"epoch": 1.412318556296587,
|
| 519 |
+
"grad_norm": 0.0,
|
| 520 |
+
"learning_rate": 2.9403687720674777e-05,
|
| 521 |
+
"loss": 0.0,
|
| 522 |
+
"step": 3600
|
| 523 |
+
},
|
| 524 |
+
{
|
| 525 |
+
"epoch": 1.4319340918007062,
|
| 526 |
+
"grad_norm": 0.0,
|
| 527 |
+
"learning_rate": 2.842291094546881e-05,
|
| 528 |
+
"loss": 0.0,
|
| 529 |
+
"step": 3650
|
| 530 |
+
},
|
| 531 |
+
{
|
| 532 |
+
"epoch": 1.4515496273048254,
|
| 533 |
+
"grad_norm": 0.0,
|
| 534 |
+
"learning_rate": 2.744213417026285e-05,
|
| 535 |
+
"loss": 0.0,
|
| 536 |
+
"step": 3700
|
| 537 |
+
},
|
| 538 |
+
{
|
| 539 |
+
"epoch": 1.4711651628089446,
|
| 540 |
+
"grad_norm": 0.0,
|
| 541 |
+
"learning_rate": 2.6461357395056884e-05,
|
| 542 |
+
"loss": 0.0,
|
| 543 |
+
"step": 3750
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"epoch": 1.4907806983130638,
|
| 547 |
+
"grad_norm": 0.0,
|
| 548 |
+
"learning_rate": 2.5480580619850925e-05,
|
| 549 |
+
"loss": 0.0,
|
| 550 |
+
"step": 3800
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"epoch": 1.5103962338171832,
|
| 554 |
+
"grad_norm": 0.0,
|
| 555 |
+
"learning_rate": 2.4499803844644962e-05,
|
| 556 |
+
"loss": 0.0,
|
| 557 |
+
"step": 3850
|
| 558 |
+
},
|
| 559 |
+
{
|
| 560 |
+
"epoch": 1.5300117693213025,
|
| 561 |
+
"grad_norm": 0.0,
|
| 562 |
+
"learning_rate": 2.3519027069439e-05,
|
| 563 |
+
"loss": 0.0,
|
| 564 |
+
"step": 3900
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"epoch": 1.5496273048254219,
|
| 568 |
+
"grad_norm": 0.0,
|
| 569 |
+
"learning_rate": 2.2538250294233036e-05,
|
| 570 |
+
"loss": 0.0,
|
| 571 |
+
"step": 3950
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"epoch": 1.569242840329541,
|
| 575 |
+
"grad_norm": 0.0,
|
| 576 |
+
"learning_rate": 2.1557473519027073e-05,
|
| 577 |
+
"loss": 0.0,
|
| 578 |
+
"step": 4000
|
| 579 |
+
},
|
| 580 |
+
{
|
| 581 |
+
"epoch": 1.5888583758336603,
|
| 582 |
+
"grad_norm": 0.0,
|
| 583 |
+
"learning_rate": 2.057669674382111e-05,
|
| 584 |
+
"loss": 0.0,
|
| 585 |
+
"step": 4050
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"epoch": 1.6084739113377795,
|
| 589 |
+
"grad_norm": 0.0,
|
| 590 |
+
"learning_rate": 1.9595919968615144e-05,
|
| 591 |
+
"loss": 0.0,
|
| 592 |
+
"step": 4100
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"epoch": 1.6280894468418987,
|
| 596 |
+
"grad_norm": 0.0,
|
| 597 |
+
"learning_rate": 1.861514319340918e-05,
|
| 598 |
+
"loss": 0.0,
|
| 599 |
+
"step": 4150
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"epoch": 1.647704982346018,
|
| 603 |
+
"grad_norm": 0.0,
|
| 604 |
+
"learning_rate": 1.7634366418203218e-05,
|
| 605 |
+
"loss": 0.0,
|
| 606 |
+
"step": 4200
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"epoch": 1.6673205178501374,
|
| 610 |
+
"grad_norm": 0.0,
|
| 611 |
+
"learning_rate": 1.6653589642997255e-05,
|
| 612 |
+
"loss": 0.0,
|
| 613 |
+
"step": 4250
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"epoch": 1.6869360533542566,
|
| 617 |
+
"grad_norm": 0.0,
|
| 618 |
+
"learning_rate": 1.5672812867791292e-05,
|
| 619 |
+
"loss": 0.0,
|
| 620 |
+
"step": 4300
|
| 621 |
+
},
|
| 622 |
+
{
|
| 623 |
+
"epoch": 1.706551588858376,
|
| 624 |
+
"grad_norm": 0.0,
|
| 625 |
+
"learning_rate": 1.4692036092585329e-05,
|
| 626 |
+
"loss": 0.0,
|
| 627 |
+
"step": 4350
|
| 628 |
+
},
|
| 629 |
+
{
|
| 630 |
+
"epoch": 1.7261671243624952,
|
| 631 |
+
"grad_norm": 0.0,
|
| 632 |
+
"learning_rate": 1.3711259317379366e-05,
|
| 633 |
+
"loss": 0.0,
|
| 634 |
+
"step": 4400
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"epoch": 1.7457826598666144,
|
| 638 |
+
"grad_norm": 0.0,
|
| 639 |
+
"learning_rate": 1.2730482542173403e-05,
|
| 640 |
+
"loss": 0.0,
|
| 641 |
+
"step": 4450
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"epoch": 1.7653981953707336,
|
| 645 |
+
"grad_norm": 0.0,
|
| 646 |
+
"learning_rate": 1.174970576696744e-05,
|
| 647 |
+
"loss": 0.0,
|
| 648 |
+
"step": 4500
|
| 649 |
+
},
|
| 650 |
+
{
|
| 651 |
+
"epoch": 1.7850137308748528,
|
| 652 |
+
"grad_norm": 0.0,
|
| 653 |
+
"learning_rate": 1.0768928991761477e-05,
|
| 654 |
+
"loss": 0.0,
|
| 655 |
+
"step": 4550
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"epoch": 1.804629266378972,
|
| 659 |
+
"grad_norm": 0.0,
|
| 660 |
+
"learning_rate": 9.788152216555512e-06,
|
| 661 |
+
"loss": 0.0,
|
| 662 |
+
"step": 4600
|
| 663 |
+
},
|
| 664 |
+
{
|
| 665 |
+
"epoch": 1.8242448018830915,
|
| 666 |
+
"grad_norm": 0.0,
|
| 667 |
+
"learning_rate": 8.80737544134955e-06,
|
| 668 |
+
"loss": 0.0,
|
| 669 |
+
"step": 4650
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"epoch": 1.8438603373872107,
|
| 673 |
+
"grad_norm": 0.0,
|
| 674 |
+
"learning_rate": 7.826598666143586e-06,
|
| 675 |
+
"loss": 0.0,
|
| 676 |
+
"step": 4700
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"epoch": 1.86347587289133,
|
| 680 |
+
"grad_norm": 0.0,
|
| 681 |
+
"learning_rate": 6.845821890937623e-06,
|
| 682 |
+
"loss": 0.0,
|
| 683 |
+
"step": 4750
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"epoch": 1.8830914083954493,
|
| 687 |
+
"grad_norm": 0.0,
|
| 688 |
+
"learning_rate": 5.86504511573166e-06,
|
| 689 |
+
"loss": 0.0,
|
| 690 |
+
"step": 4800
|
| 691 |
+
},
|
| 692 |
+
{
|
| 693 |
+
"epoch": 1.9027069438995685,
|
| 694 |
+
"grad_norm": 0.0,
|
| 695 |
+
"learning_rate": 4.8842683405256965e-06,
|
| 696 |
+
"loss": 0.0,
|
| 697 |
+
"step": 4850
|
| 698 |
+
},
|
| 699 |
+
{
|
| 700 |
+
"epoch": 1.9223224794036877,
|
| 701 |
+
"grad_norm": 0.0,
|
| 702 |
+
"learning_rate": 3.9034915653197335e-06,
|
| 703 |
+
"loss": 0.0,
|
| 704 |
+
"step": 4900
|
| 705 |
+
},
|
| 706 |
+
{
|
| 707 |
+
"epoch": 1.941938014907807,
|
| 708 |
+
"grad_norm": 0.0,
|
| 709 |
+
"learning_rate": 2.92271479011377e-06,
|
| 710 |
+
"loss": 0.0,
|
| 711 |
+
"step": 4950
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"epoch": 1.9615535504119261,
|
| 715 |
+
"grad_norm": 0.0,
|
| 716 |
+
"learning_rate": 1.941938014907807e-06,
|
| 717 |
+
"loss": 0.0,
|
| 718 |
+
"step": 5000
|
| 719 |
+
},
|
| 720 |
+
{
|
| 721 |
+
"epoch": 1.9811690859160453,
|
| 722 |
+
"grad_norm": 0.0,
|
| 723 |
+
"learning_rate": 9.61161239701844e-07,
|
| 724 |
+
"loss": 0.0,
|
| 725 |
+
"step": 5050
|
| 726 |
+
},
|
| 727 |
+
{
|
| 728 |
+
"epoch": 2.0,
|
| 729 |
+
"eval_loss": 0.0,
|
| 730 |
+
"eval_runtime": 4.9822,
|
| 731 |
+
"eval_samples_per_second": 33.72,
|
| 732 |
+
"eval_steps_per_second": 1.204,
|
| 733 |
+
"step": 5098
|
| 734 |
+
}
|
| 735 |
+
],
|
| 736 |
+
"logging_steps": 50,
|
| 737 |
+
"max_steps": 5098,
|
| 738 |
+
"num_input_tokens_seen": 0,
|
| 739 |
+
"num_train_epochs": 2,
|
| 740 |
+
"save_steps": 500,
|
| 741 |
+
"stateful_callbacks": {
|
| 742 |
+
"TrainerControl": {
|
| 743 |
+
"args": {
|
| 744 |
+
"should_epoch_stop": false,
|
| 745 |
+
"should_evaluate": false,
|
| 746 |
+
"should_log": false,
|
| 747 |
+
"should_save": true,
|
| 748 |
+
"should_training_stop": true
|
| 749 |
+
},
|
| 750 |
+
"attributes": {}
|
| 751 |
+
}
|
| 752 |
+
},
|
| 753 |
+
"total_flos": 0.0,
|
| 754 |
+
"train_batch_size": 16,
|
| 755 |
+
"trial_name": null,
|
| 756 |
+
"trial_params": null
|
| 757 |
+
}
|
nvidia-llama-nemotron-rerank-1b-v2_llama-E2-Pairwise/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5faa7d5c61b4800ee7490e3c72bda98672158b8917ee8959ced0ed37f02f6b26
|
| 3 |
+
size 5265
|