Feature Extraction
sentence-transformers
ONNX
Safetensors
Transformers
new
code
retrieval
custom_code
text-embeddings-inference
Instructions to use Renzos65/SFR-Embedding-Code-400M_R with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Renzos65/SFR-Embedding-Code-400M_R with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Renzos65/SFR-Embedding-Code-400M_R", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use Renzos65/SFR-Embedding-Code-400M_R with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Renzos65/SFR-Embedding-Code-400M_R", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Renzos65/SFR-Embedding-Code-400M_R", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,582 Bytes
33211e1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | {
"_name_or_path": "/export/xgen-embedding/runs/yeliu/train/code_v4/gte-large_text_code_v4_short_addtext_addsql/checkpoints/step_2000",
"architectures": [
"NewModel"
],
"attention_probs_dropout_prob": 0.0,
"auto_map": {
"AutoConfig": "Alibaba-NLP/new-impl--configuration.NewConfig",
"AutoModel": "Alibaba-NLP/new-impl--modeling.NewModel",
"AutoModelForMaskedLM": "Alibaba-NLP/new-impl--modeling.NewForMaskedLM",
"AutoModelForMultipleChoice": "Alibaba-NLP/new-impl--modeling.NewForMultipleChoice",
"AutoModelForQuestionAnswering": "Alibaba-NLP/new-impl--modeling.NewForQuestionAnswering",
"AutoModelForSequenceClassification": "Alibaba-NLP/new-impl--modeling.NewForSequenceClassification",
"AutoModelForTokenClassification": "Alibaba-NLP/new-impl--modeling.NewForTokenClassification"
},
"classifier_dropout": null,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"hidden_size": 1024,
"initializer_range": 0.02,
"intermediate_size": 4096,
"layer_norm_eps": 1e-12,
"layer_norm_type": "layer_norm",
"logn_attention_clip1": false,
"logn_attention_scale": false,
"max_position_embeddings": 8192,
"model_type": "new",
"num_attention_heads": 16,
"num_hidden_layers": 24,
"pack_qkv": true,
"pad_token_id": 0,
"position_embedding_type": "rope",
"rope_scaling": {
"factor": 2.0,
"type": "ntk"
},
"rope_theta": 160000,
"torch_dtype": "bfloat16",
"transformers_version": "4.45.1",
"type_vocab_size": 2,
"unpad_inputs": false,
"use_memory_efficient_attention": false,
"vocab_size": 30528
}
|