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-finetuned-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-finetuned-crewai-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

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

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("itsanan/codebert-finetuned-crewai-base")
    
    sentences = [
        "How to implement __del__?",
        "class SampleMultiCrewFlow(Flow[SimpleState]):\n        @start()\n        def first_crew(self):\n            \"\"\"Run first crew.\"\"\"\n            agent = Agent(\n                role=\"first agent\",\n                goal=\"first task\",\n                backstory=\"first agent\",\n                llm=mock_llm_1,\n            )\n            task = Task(\n                description=\"First task\",\n                expected_output=\"first result\",\n                agent=agent,\n            )\n            crew = Crew(\n                agents=[agent],\n                tasks=[task],\n                share_crew=True,\n            )\n\n            result = crew.kickoff()\n\n            assert crew._execution_span is not None\n            return str(result.raw)\n\n        @listen(first_crew)\n        def second_crew(self, first_result: str):\n            \"\"\"Run second crew.\"\"\"\n            agent = Agent(\n                role=\"second agent\",\n                goal=\"second task\",\n                backstory=\"second agent\",\n                llm=mock_llm_2,\n            )\n            task = Task(\n                description=\"Second task\",\n                expected_output=\"second result\",\n                agent=agent,\n            )\n            crew = Crew(\n                agents=[agent],\n                tasks=[task],\n                share_crew=True,\n            )\n\n            result = crew.kickoff()\n\n            assert crew._execution_span is not None\n\n            self.state.result = f\"{first_result} + {result.raw}\"\n            return self.state.result",
        "async def test_anthropic_async_with_tools():\n    \"\"\"Test async call with tools.\"\"\"\n    llm = AnthropicCompletion(model=\"claude-sonnet-4-0\")\n\n    tools = [\n        {\n            \"type\": \"function\",\n            \"function\": {\n                \"name\": \"get_weather\",\n                \"description\": \"Get the current weather for a location\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"location\": {\n                            \"type\": \"string\",\n                            \"description\": \"The city and state, e.g. San Francisco, CA\"\n                        }\n                    },\n                    \"required\": [\"location\"]\n                }\n            }\n        }\n    ]\n\n    result = await llm.acall(\n        \"What's the weather in San Francisco?\",\n        tools=tools\n    )\n    logging.debug(\"result: %s\", result)\n\n    assert result is not None\n    assert isinstance(result, str)",
        "def __del__(self):\n        \"\"\"Cleanup connections on deletion.\"\"\"\n        try:\n            if self._connection_pool:\n                for conn in self._connection_pool:\n                    try:\n                        conn.close()\n                    except Exception:  # noqa: PERF203, S110\n                        pass\n            if self._thread_pool:\n                self._thread_pool.shutdown()\n        except Exception:  # noqa: S110\n            pass"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
codebert-finetuned-crewai-base
503 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
itsanan's picture
itsanan
Add new SentenceTransformer model
28ae705 verified 4 months ago
  • 1_Pooling
    Add new SentenceTransformer model 4 months ago
  • .gitattributes
    1.52 kB
    initial commit 4 months ago
  • README.md
    40.4 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.44 kB
    Add new SentenceTransformer model 4 months ago
  • vocab.json
    798 kB
    Add new SentenceTransformer model 4 months ago