Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

codefuse-ai
/
C2LLM-0.5B

Feature Extraction
Transformers
Safetensors
sentence-transformers
English
Chinese
c2llm
code
custom_code
Model card Files Files and versions
xet
Community
2

Instructions to use codefuse-ai/C2LLM-0.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use codefuse-ai/C2LLM-0.5B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("feature-extraction", model="codefuse-ai/C2LLM-0.5B", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("codefuse-ai/C2LLM-0.5B", trust_remote_code=True, dtype="auto")
  • sentence-transformers

    How to use codefuse-ai/C2LLM-0.5B with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("codefuse-ai/C2LLM-0.5B", 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]
  • Notebooks
  • Google Colab
  • Kaggle
C2LLM-0.5B
1.01 GB
Ctrl+K
Ctrl+K
  • 4 contributors
History: 15 commits
tomaarsen's picture
tomaarsen HF Staff
Add `sentence-transformers` tag for better discoverability
ec357dc verified 4 months ago
  • .gitattributes
    1.57 kB
    Upload folder using huggingface_hub 5 months ago
  • README.md
    5.97 kB
    Add `sentence-transformers` tag for better discoverability 4 months ago
  • added_tokens.json
    605 Bytes
    Upload folder using huggingface_hub 5 months ago
  • config.json
    1 kB
    Upload folder using huggingface_hub 5 months ago
  • config_sentence_transformers.json
    229 Bytes
    Upload folder using huggingface_hub 5 months ago
  • configuration_c2llm.py
    2.78 kB
    Update configuration_c2llm.py 5 months ago
  • custom_transformer.py
    1.46 kB
    Upload folder using huggingface_hub 5 months ago
  • merges.txt
    1.67 MB
    Upload folder using huggingface_hub 5 months ago
  • model.safetensors
    995 MB
    xet
    Upload folder using huggingface_hub 5 months ago
  • modeling_c2llm.py
    25.1 kB
    Update modeling_c2llm.py 5 months ago
  • modules.json
    108 Bytes
    Upload folder using huggingface_hub 5 months ago
  • sentence_bert_config.json
    55 Bytes
    Upload folder using huggingface_hub 5 months ago
  • special_tokens_map.json
    613 Bytes
    Upload folder using huggingface_hub 5 months ago
  • tokenizer.json
    11.4 MB
    xet
    Upload folder using huggingface_hub 5 months ago
  • tokenizer_config.json
    7.34 kB
    Upload folder using huggingface_hub 5 months ago
  • vocab.json
    2.78 MB
    Upload folder using huggingface_hub 5 months ago