Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

csolaina
/
lora_r8_a16_d5_bs16_ep1

Sentence Similarity
sentence-transformers
Safetensors
feature-extraction
Generated from Trainer
dataset_size:13734
loss:MultipleNegativesRankingLoss
Model card Files Files and versions
xet
Community

Instructions to use csolaina/lora_r8_a16_d5_bs16_ep1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use csolaina/lora_r8_a16_d5_bs16_ep1 with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("csolaina/lora_r8_a16_d5_bs16_ep1")
    
    sentences = [
        "test common check as frame",
        "    def predict_proba(self, raw_prediction):\n        \"\"\"Predict probabilities.\n\n        Parameters\n        ----------\n        raw_prediction : array of shape (n_samples,) or (n_samples, 1)\n            Raw prediction values (in link space).\n\n        Returns\n        -------\n        proba : array of shape (n_samples, 2)\n            Element-wise class probabilities.\n        \"\"\"\n        # Be graceful to shape (n_samples, 1) -> (n_samples,)\n        if raw_prediction.ndim == 2 and raw_prediction.shape[1] == 1:\n            raw_prediction = raw_prediction.squeeze(1)\n        proba = np.empty((raw_prediction.shape[0], 2), dtype=raw_prediction.dtype)\n        proba[:, 1] = self.link.inverse(raw_prediction)\n        proba[:, 0] = 1 - proba[:, 1]\n        return proba",
        "def test_common_check_as_frame(name, dataset_func):\n    bunch = dataset_func()\n    check_as_frame(bunch, dataset_func)",
        "    def __sklearn_tags__(self):\n        tags = super().__sklearn_tags__()\n        tags.input_tags.allow_nan = True\n        tags.input_tags.sparse = True\n        return tags"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
lora_r8_a16_d5_bs16_ep1
2.78 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
csolaina's picture
csolaina
Upload folder using huggingface_hub
17aeb72 verified over 1 year ago
  • 1_Pooling
    Upload folder using huggingface_hub over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    32.1 kB
    Upload folder using huggingface_hub over 1 year ago
  • adapter_config.json
    789 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • adapter_model.safetensors
    1.8 MB
    xet
    Upload folder using huggingface_hub over 1 year ago
  • config_sentence_transformers.json
    205 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • modules.json
    349 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • sentence_bert_config.json
    53 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • special_tokens_map.json
    695 Bytes
    Upload folder using huggingface_hub over 1 year ago
  • tokenizer.json
    712 kB
    Upload folder using huggingface_hub over 1 year ago
  • tokenizer_config.json
    1.22 kB
    Upload folder using huggingface_hub over 1 year ago
  • vocab.txt
    232 kB
    Upload folder using huggingface_hub over 1 year ago