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

Maximgolubov
/
legal-ft-2

Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
dense
Generated from Trainer
dataset_size:160
loss:MatryoshkaLoss
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Model card Files Files and versions
xet
Community

Instructions to use Maximgolubov/legal-ft-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use Maximgolubov/legal-ft-2 with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("Maximgolubov/legal-ft-2")
    
    sentences = [
        "What is the total cost to process 68,000 images based on the provided token calculations?",
        "One way to think about these models is an extension of the chain-of-thought prompting trick, first explored in the May 2022 paper Large Language Models are Zero-Shot Reasoners.\nThis is that trick where, if you get a model to talk out loud about a problem it’s solving, you often get a result which the model would not have achieved otherwise.\no1 takes this process and further bakes it into the model itself. The details are somewhat obfuscated: o1 models spend “reasoning tokens” thinking through the problem that are not directly visible to the user (though the ChatGPT UI shows a summary of them), then outputs a final result.",
        "Each photo would need 260 input tokens and around 100 output tokens.\n260 * 68,000 = 17,680,000 input tokens\n17,680,000 * $0.0375/million = $0.66\n100 * 68,000 = 6,800,000 output tokens\n6,800,000 * $0.15/million = $1.02\nThat’s a total cost of $1.68 to process 68,000 images. That’s so absurdly cheap I had to run the numbers three times to confirm I got it right.\nHow good are those descriptions? Here’s what I got from this command:\nllm -m gemini-1.5-flash-8b-latest describe -a IMG_1825.jpeg",
        "So far, I think they’re a net positive. I’ve used them on a personal level to improve my productivity (and entertain myself) in all sorts of different ways. I think people who learn how to use them effectively can gain a significant boost to their quality of life.\nA lot of people are yet to be sold on their value! Some think their negatives outweigh their positives, some think they are all hot air, and some even think they represent an existential threat to humanity.\nThey’re actually quite easy to build\nThe most surprising thing we’ve learned about LLMs this year is that they’re actually quite easy to build."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
legal-ft-2
1.34 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
Maximgolubov's picture
Maximgolubov
Add new SentenceTransformer model
d585ccc verified 7 months ago
  • 1_Pooling
    Add new SentenceTransformer model 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • README.md
    28.5 kB
    Add new SentenceTransformer model 7 months ago
  • config.json
    711 Bytes
    Add new SentenceTransformer model 7 months ago
  • config_sentence_transformers.json
    339 Bytes
    Add new SentenceTransformer model 7 months ago
  • model.safetensors
    1.34 GB
    xet
    Add new SentenceTransformer model 7 months ago
  • modules.json
    349 Bytes
    Add new SentenceTransformer model 7 months ago
  • sentence_bert_config.json
    57 Bytes
    Add new SentenceTransformer model 7 months ago
  • tokenizer.json
    712 kB
    Add new SentenceTransformer model 7 months ago
  • tokenizer_config.json
    553 Bytes
    Add new SentenceTransformer model 7 months ago