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
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

itsanan
/
codebert-embed-crewai-base

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

Instructions to use itsanan/codebert-embed-crewai-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use itsanan/codebert-embed-crewai-base with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("itsanan/codebert-embed-crewai-base")
    
    sentences = [
        "Explain the test_code_docs_search_tool logic",
        "def test_anthropic_call_with_interceptor_tracks_requests(self) -> None:\n        \"\"\"Test that interceptor tracks Anthropic API requests.\"\"\"\n        interceptor = AnthropicTestInterceptor()\n        llm = LLM(model=\"anthropic/claude-3-5-haiku-20241022\", interceptor=interceptor)\n\n        # Make a simple completion call\n        result = llm.call(\n            messages=[{\"role\": \"user\", \"content\": \"Say 'Hello World' and nothing else\"}]\n        )\n\n        # Verify custom headers were added\n        for request in interceptor.outbound_calls:\n            assert \"X-Anthropic-Interceptor\" in request.headers\n            assert request.headers[\"X-Anthropic-Interceptor\"] == \"anthropic-test-value\"\n            assert \"X-Request-ID\" in request.headers\n            assert request.headers[\"X-Request-ID\"] == \"test-request-456\"\n\n        # Verify response was tracked\n        for response in interceptor.inbound_calls:\n            assert \"X-Response-Tracked\" in response.headers\n            assert response.headers[\"X-Response-Tracked\"] == \"true\"\n\n        # Verify result is valid\n        assert result is not None\n        assert isinstance(result, str)\n        assert len(result) > 0",
        "def on_inbound(self, message: httpx.Response) -> httpx.Response:\n        \"\"\"Pass through inbound response.\n\n        Args:\n            message: The inbound response.\n\n        Returns:\n            The response unchanged.\n        \"\"\"\n        return message",
        "def test_code_docs_search_tool(mock_adapter):\n    mock_adapter.query.return_value = \"test documentation\"\n\n    docs_url = \"https://crewai.com/any-docs-url\"\n    search_query = \"test documentation\"\n    tool = CodeDocsSearchTool(docs_url=docs_url, adapter=mock_adapter)\n    result = tool._run(search_query=search_query)\n    assert \"test documentation\" in result\n    mock_adapter.add.assert_called_once_with(docs_url, data_type=DataType.DOCS_SITE)\n    mock_adapter.query.assert_called_once_with(\n        search_query, similarity_threshold=0.6, limit=5\n    )\n\n    mock_adapter.query.reset_mock()\n    mock_adapter.add.reset_mock()\n\n    tool = CodeDocsSearchTool(adapter=mock_adapter)\n    result = tool._run(docs_url=docs_url, search_query=search_query)\n    assert \"test documentation\" in result\n    mock_adapter.add.assert_called_once_with(docs_url, data_type=DataType.DOCS_SITE)\n    mock_adapter.query.assert_called_once_with(\n        search_query, similarity_threshold=0.6, limit=5\n    )"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
codebert-embed-crewai-base
503 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
itsanan's picture
itsanan
Add new SentenceTransformer model
fbef0ac verified 4 months ago
  • 1_Pooling
    Add new SentenceTransformer model 4 months ago
  • .gitattributes
    1.52 kB
    initial commit 4 months ago
  • README.md
    44.7 kB
    Add new SentenceTransformer model 4 months ago
  • config.json
    648 Bytes
    Add new SentenceTransformer model 4 months ago
  • config_sentence_transformers.json
    283 Bytes
    Add new SentenceTransformer model 4 months ago
  • merges.txt
    456 kB
    Add new SentenceTransformer model 4 months ago
  • model.safetensors
    499 MB
    xet
    Add new SentenceTransformer model 4 months ago
  • modules.json
    229 Bytes
    Add new SentenceTransformer model 4 months ago
  • sentence_bert_config.json
    57 Bytes
    Add new SentenceTransformer model 4 months ago
  • special_tokens_map.json
    958 Bytes
    Add new SentenceTransformer model 4 months ago
  • tokenizer.json
    3.56 MB
    Add new SentenceTransformer model 4 months ago
  • tokenizer_config.json
    1.25 kB
    Add new SentenceTransformer model 4 months ago
  • vocab.json
    798 kB
    Add new SentenceTransformer model 4 months ago