Sentence Similarity
sentence-transformers
Safetensors
modernbert
feature-extraction
dense
Generated from Trainer
dataset_size:8003584
loss:CachedMultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use Shuu12121/CodeSearch-ModernBERT-Crow-v3-large-len1024-Plus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Shuu12121/CodeSearch-ModernBERT-Crow-v3-large-len1024-Plus with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Shuu12121/CodeSearch-ModernBERT-Crow-v3-large-len1024-Plus") sentences = [ "WithUUID adds the uuid to the snapshot policy collection get params", "func (o *SnapshotPolicyCollectionGetParams) WithUUID(uuid *string) *SnapshotPolicyCollectionGetParams {\n\to.SetUUID(uuid)\n\treturn o\n}", "func (c *SageMaker) DescribeHumanTaskUi(input *DescribeHumanTaskUiInput) (*DescribeHumanTaskUiOutput, error) {\n\treq, out := c.DescribeHumanTaskUiRequest(input)\n\treturn out, req.Send()\n}", "func (_mock *Client) GetImportRequest(context1 context.Context, getImportRequestArgs git.GetImportRequestArgs) (*git.GitImportRequest, error) {\n\tret := _mock.Called(context1, getImportRequestArgs)\n\n\tif len(ret) == 0 {\n\t\tpanic(\"no return value specified for GetImportRequest\")\n\t}\n\n\tvar r0 *git.GitImportRequest\n\tvar r1 error\n\tif returnFunc, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) (*git.GitImportRequest, error)); ok {\n\t\treturn returnFunc(context1, getImportRequestArgs)\n\t}\n\tif returnFunc, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) *git.GitImportRequest); ok {\n\t\tr0 = returnFunc(context1, getImportRequestArgs)\n\t} else {\n\t\tif ret.Get(0) != nil {\n\t\t\tr0 = ret.Get(0).(*git.GitImportRequest)\n\t\t}\n\t}\n\tif returnFunc, ok := ret.Get(1).(func(context.Context, git.GetImportRequestArgs) error); ok {\n\t\tr1 = returnFunc(context1, getImportRequestArgs)\n\t} else {\n\t\tr1 = ret.Error(1)\n\t}\n\treturn r0, r1\n}" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Shuu12121/CodeSearch-ModernBERT-Crow-v3-large-len1024-Plus: direct link, hf CLI and curl.
- Browser
- Download file 31 kB
-
https://huggingface.co/Shuu12121/CodeSearch-ModernBERT-Crow-v3-large-len1024-Plus/resolve/main/README.md
- Command line
-
hf download hf://Shuu12121/CodeSearch-ModernBERT-Crow-v3-large-len1024-Plus/README.md
-
curl -L -o README.md https://huggingface.co/Shuu12121/CodeSearch-ModernBERT-Crow-v3-large-len1024-Plus/resolve/main/README.md
31 kB
metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:8003584
- loss:CachedMultipleNegativesRankingLoss
base_model: Shuu12121/CodeModernBERT-Crow-v3-large-len1024
widget:
- source_sentence: WithUUID adds the uuid to the snapshot policy collection get params
sentences:
- "func (o *SnapshotPolicyCollectionGetParams) WithUUID(uuid *string) *SnapshotPolicyCollectionGetParams {\n\to.SetUUID(uuid)\n\treturn o\n}"
- "func (c *SageMaker) DescribeHumanTaskUi(input *DescribeHumanTaskUiInput) (*DescribeHumanTaskUiOutput, error) {\n\treq, out := c.DescribeHumanTaskUiRequest(input)\n\treturn out, req.Send()\n}"
- "func (_mock *Client) GetImportRequest(context1 context.Context, getImportRequestArgs git.GetImportRequestArgs) (*git.GitImportRequest, error) {\n\tret := _mock.Called(context1, getImportRequestArgs)\n\n\tif len(ret) == 0 {\n\t\tpanic(\"no return value specified for GetImportRequest\")\n\t}\n\n\tvar r0 *git.GitImportRequest\n\tvar r1 error\n\tif returnFunc, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) (*git.GitImportRequest, error)); ok {\n\t\treturn returnFunc(context1, getImportRequestArgs)\n\t}\n\tif returnFunc, ok := ret.Get(0).(func(context.Context, git.GetImportRequestArgs) *git.GitImportRequest); ok {\n\t\tr0 = returnFunc(context1, getImportRequestArgs)\n\t} else {\n\t\tif ret.Get(0) != nil {\n\t\t\tr0 = ret.Get(0).(*git.GitImportRequest)\n\t\t}\n\t}\n\tif returnFunc, ok := ret.Get(1).(func(context.Context, git.GetImportRequestArgs) error); ok {\n\t\tr1 = returnFunc(context1, getImportRequestArgs)\n\t} else {\n\t\tr1 = ret.Error(1)\n\t}\n\treturn r0, r1\n}"
- source_sentence: >-
RegisterRegionSslCertificatesHandlerServer registers the http handlers for
service RegionSslCertificates to "mux".
UnaryRPC :call RegionSslCertificatesServer directly.
StreamingRPC :currently unsupported pending
https://github.com/grpc/grpc-go/issues/906.
Note that using this registration option will cause many gRPC library
features to stop working. Consider using
RegisterRegionSslCertificatesHandlerFromEndpoint instead.
sentences:
- "func (in *ByoipCIDREvent) DeepCopy() *ByoipCIDREvent {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ByoipCIDREvent)\n\tin.DeepCopyInto(out)\n\treturn out\n}"
- "func RegisterRegionSslCertificatesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegionSslCertificatesServer) error {\n\n\tmux.Handle(\"DELETE\", pattern_RegionSslCertificates_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tvar err error\n\t\tvar annotatedContext context.Context\n\t\tannotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, \"/mockgcp.cloud.compute.v1.RegionSslCertificates/Delete\", runtime.WithHTTPPathPattern(\"/compute/v1/projects/{project}/regions/{region}/sslCertificates/{ssl_certificate}\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_RegionSslCertificates_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_RegionSslCertificates_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"GET\", pattern_RegionSslCertificates_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tvar err error\n\t\tvar annotatedContext context.Context\n\t\tannotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, \"/mockgcp.cloud.compute.v1.RegionSslCertificates/Get\", runtime.WithHTTPPathPattern(\"/compute/v1/projects/{project}/regions/{region}/sslCertificates/{ssl_certificate}\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_RegionSslCertificates_Get_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_RegionSslCertificates_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"POST\", pattern_RegionSslCertificates_Insert_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tvar err error\n\t\tvar annotatedContext context.Context\n\t\tannotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, \"/mockgcp.cloud.compute.v1.RegionSslCertificates/Insert\", runtime.WithHTTPPathPattern(\"/compute/v1/projects/{project}/regions/{region}/sslCertificates\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_RegionSslCertificates_Insert_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_RegionSslCertificates_Insert_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\tmux.Handle(\"GET\", pattern_RegionSslCertificates_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {\n\t\tctx, cancel := context.WithCancel(req.Context())\n\t\tdefer cancel()\n\t\tvar stream runtime.ServerTransportStream\n\t\tctx = grpc.NewContextWithServerTransportStream(ctx, &stream)\n\t\tinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)\n\t\tvar err error\n\t\tvar annotatedContext context.Context\n\t\tannotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, \"/mockgcp.cloud.compute.v1.RegionSslCertificates/List\", runtime.WithHTTPPathPattern(\"/compute/v1/projects/{project}/regions/{region}/sslCertificates\"))\n\t\tif err != nil {\n\t\t\truntime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\t\tresp, md, err := local_request_RegionSslCertificates_List_0(annotatedContext, inboundMarshaler, server, req, pathParams)\n\t\tmd.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())\n\t\tannotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)\n\t\tif err != nil {\n\t\t\truntime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)\n\t\t\treturn\n\t\t}\n\n\t\tforward_RegionSslCertificates_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)\n\n\t})\n\n\treturn nil\n}"
- >-
func (m *ItemScheduleRequestBuilder) Delete(ctx context.Context,
requestConfiguration
*ItemScheduleRequestBuilderDeleteRequestConfiguration)(error) {
requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration);
if err != nil {
return err
}
errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings {
"4XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,
"5XX": ia572726a95efa92ddd544552cd950653dc691023836923576b2f4bf716cf204a.CreateODataErrorFromDiscriminatorValue,
}
err = m.requestAdapter.SendNoContent(ctx, requestInfo, errorMapping)
if err != nil {
return err
}
return nil
}
- source_sentence: >-
signPSSWithSalt calculates the signature of hashed using PSS [1] with
specified salt.
Note that hashed must be the result of hashing the input message using the
given hash function. salt is a random sequence of bytes whose length will
be
later used to verify the signature.
sentences:
- "func signPSSWithSalt(rand io.Reader, priv *PrivateKey, hash crypto.Hash, hashed, salt []byte) (s []byte, err error) {\n\tnBits := priv.N.BitLen()\n\tem, err := emsaPSSEncode(hashed, nBits-1, salt, hash.New())\n\tif err != nil {\n\t\treturn\n\t}\n\tm := new(big.Int).SetBytes(em)\n\tc, err := decryptAndCheck(rand, priv, m)\n\tif err != nil {\n\t\treturn\n\t}\n\ts = make([]byte, (nBits+7)/8)\n\tcopyWithLeftPad(s, c.Bytes())\n\treturn\n}"
- "func (iow *IOWrapper) Close() error {\n\tdefer iow.lockUnlock()()\n\n\tif c := iow.Closer; c != nil {\n\t\treturn c.Close()\n\t}\n\treturn nil\n}"
- "func (mr *MockEnsurerMockRecorder) EnsureAdditionalFiles(ctx, gctx, new, old any) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"EnsureAdditionalFiles\", reflect.TypeOf((*MockEnsurer)(nil).EnsureAdditionalFiles), ctx, gctx, new, old)\n}"
- source_sentence: >-
PutBlobPartial attempts to create a blob using the data that is already
present
at the destination. chunkAccessor is accessed in a non-sequential way to
retrieve the missing chunks.
It is available only if SupportsPutBlobPartial().
Even if SupportsPutBlobPartial() returns true, the call can fail, in which
case the caller
should fall back to PutBlobWithOptions.
sentences:
- "func (v *VmmToVmmNetworkMappingSettings) UnmarshalJSON(data []byte) error {\n\tvar rawMsg map[string]json.RawMessage\n\tif err := json.Unmarshal(data, &rawMsg); err != nil {\n\t\treturn fmt.Errorf(\"unmarshalling type %T: %v\", v, err)\n\t}\n\tfor key, val := range rawMsg {\n\t\tvar err error\n\t\tswitch key {\n\t\tcase \"instanceType\":\n\t\t\terr = unpopulate(val, \"InstanceType\", &v.InstanceType)\n\t\t\tdelete(rawMsg, key)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unmarshalling type %T: %v\", v, err)\n\t\t}\n\t}\n\treturn nil\n}"
- "func (d *ociArchiveImageDestination) PutBlobPartial(ctx context.Context, chunkAccessor private.BlobChunkAccessor, srcInfo types.BlobInfo, options private.PutBlobPartialOptions) (private.UploadedBlob, error) {\n\treturn d.unpackedDest.PutBlobPartial(ctx, chunkAccessor, srcInfo, options)\n}"
- "func (p *parserMixin) Ints() (target *[]int) {\n\ttarget = new([]int)\n\tp.IntsVar(target)\n\treturn\n}"
- source_sentence: >-
OnEachBatchTx registers a handler for a specific event type that is
contingent on a transaction.
sentences:
- "func (ResourceGroupState) Values() []ResourceGroupState {\n\treturn []ResourceGroupState{\n\t\t\"CREATING\",\n\t\t\"CREATE_COMPLETE\",\n\t\t\"CREATE_FAILED\",\n\t\t\"UPDATING\",\n\t\t\"UPDATE_COMPLETE\",\n\t\t\"UPDATE_FAILED\",\n\t}\n}"
- "func (s *GetDomainDetailOutput) SetAbuseContactEmail(v string) *GetDomainDetailOutput {\n\ts.AbuseContactEmail = &v\n\treturn s\n}"
- "func OnEachBatchTx[T, TTx comparable](b *Bus, fn func(ctx context.Context, tx TTx, data []T) error) {\n\tsub := findBus[T, TTx](b)\n\tsub.onBatchTx = append(sub.onBatchTx, fn)\n}"
pipeline_tag: sentence-similarity
library_name: sentence-transformers
SentenceTransformer based on Shuu12121/CodeModernBERT-Crow-v3-large-len1024
This is a sentence-transformers model finetuned from Shuu12121/CodeModernBERT-Crow-v3-large-len1024. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: Shuu12121/CodeModernBERT-Crow-v3-large-len1024
- Maximum Sequence Length: 1024 tokens
- Output Dimensionality: 1024 dimensions
- Similarity Function: Cosine Similarity
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 1024, 'do_lower_case': False, 'architecture': 'ModernBertModel'})
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)
Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'OnEachBatchTx registers a handler for a specific event type that is contingent on a transaction.',
'func OnEachBatchTx[T, TTx comparable](b *Bus, fn func(ctx context.Context, tx TTx, data []T) error) {\n\tsub := findBus[T, TTx](b)\n\tsub.onBatchTx = append(sub.onBatchTx, fn)\n}',
'func (s *GetDomainDetailOutput) SetAbuseContactEmail(v string) *GetDomainDetailOutput {\n\ts.AbuseContactEmail = &v\n\treturn s\n}',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.7953, 0.0445],
# [0.7953, 1.0000, 0.0267],
# [0.0445, 0.0267, 1.0000]])
Training Details
Training Dataset
Unnamed Dataset
- Size: 8,003,584 training samples
- Columns:
sentence_0,sentence_1, andlabel - Approximate statistics based on the first 1000 samples:
sentence_0 sentence_1 label type string string float details - min: 8 tokens
- mean: 36.78 tokens
- max: 1024 tokens
- min: 15 tokens
- mean: 165.61 tokens
- max: 1024 tokens
- min: 1.0
- mean: 1.0
- max: 1.0
- Samples:
sentence_0 sentence_1 label Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ee1eec42dcc710ff88db2d1bf574b2f9afe3d654/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/examples/DomainTopicEventSubscriptions_Delete.jsonfunc ExampleDomainTopicEventSubscriptionsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDomainTopicEventSubscriptionsClient().BeginDelete(ctx, "examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}1.0newUpgradeContext creates a Context, avoid nil Context member.
only used for testing now.func newUpgradeContext() Context {
return Context{
Context: context.Background(),
SubTaskConfigs: make(map[string]map[string]config.SubTaskConfig),
}
}1.0ToPostRequestInformation create new navigation property to rules for policiesfunc (m *RoleManagementPoliciesItemRulesRequestBuilder) ToPostRequestInformation(ctx context.Context, body iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.UnifiedRoleManagementPolicyRuleable, requestConfiguration *RoleManagementPoliciesItemRulesRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
requestInfo.Headers.Add("Accept", "application/json")
err := requestInfo.SetContentFromParsable(ctx, m.requestAdapter, "application/json", body)
if err != nil {
return nil, err
}
if requestConfiguration != nil {
requestInfo.Headers.AddAll(requestConfiguration.Header...1.0 - Loss:
CachedMultipleNegativesRankingLosswith these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim", "mini_batch_size": 32, "gather_across_devices": false }
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 1024per_device_eval_batch_size: 1024num_train_epochs: 1fp16: Truemulti_dataset_batch_sampler: round_robin
All Hyperparameters
Click to expand
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 1024per_device_eval_batch_size: 1024per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 1max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.0warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torch_fusedoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthproject: huggingfacetrackio_space_id: trackioddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: noneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Trueprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robinrouter_mapping: {}learning_rate_mapping: {}
Training Logs
| Epoch | Step | Training Loss |
|---|---|---|
| 0.0640 | 500 | 0.6221 |
| 0.1279 | 1000 | 0.1793 |
| 0.1919 | 1500 | 0.1571 |
| 0.2559 | 2000 | 0.1442 |
| 0.3199 | 2500 | 0.1323 |
| 0.3838 | 3000 | 0.124 |
| 0.4478 | 3500 | 0.1165 |
| 0.5118 | 4000 | 0.1105 |
| 0.5757 | 4500 | 0.1042 |
| 0.6397 | 5000 | 0.099 |
| 0.7037 | 5500 | 0.0966 |
| 0.7677 | 6000 | 0.0914 |
| 0.8316 | 6500 | 0.0893 |
| 0.8956 | 7000 | 0.0876 |
| 0.9596 | 7500 | 0.086 |
Framework Versions
- Python: 3.10.12
- Sentence Transformers: 5.2.0
- Transformers: 4.57.3
- PyTorch: 2.8.0+cu128
- Accelerate: 1.12.0
- Datasets: 3.6.0
- Tokenizers: 0.22.1
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
CachedMultipleNegativesRankingLoss
@misc{gao2021scaling,
title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
year={2021},
eprint={2101.06983},
archivePrefix={arXiv},
primaryClass={cs.LG}
}