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

shareAI
/
CodeLlama-13b-English-Chat

Text Generation
Transformers
PyTorch
English
llama
code
custom_code
text-generation-inference
Model card Files Files and versions
xet
Community
1

Instructions to use shareAI/CodeLlama-13b-English-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use shareAI/CodeLlama-13b-English-Chat with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="shareAI/CodeLlama-13b-English-Chat", trust_remote_code=True)
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForMultimodalLM
    
    tokenizer = AutoTokenizer.from_pretrained("shareAI/CodeLlama-13b-English-Chat", trust_remote_code=True)
    model = AutoModelForMultimodalLM.from_pretrained("shareAI/CodeLlama-13b-English-Chat", trust_remote_code=True)
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use shareAI/CodeLlama-13b-English-Chat with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "shareAI/CodeLlama-13b-English-Chat"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "shareAI/CodeLlama-13b-English-Chat",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/shareAI/CodeLlama-13b-English-Chat
  • SGLang

    How to use shareAI/CodeLlama-13b-English-Chat with SGLang:

    Install from pip and serve model
    # Install SGLang from pip:
    pip install sglang
    # Start the SGLang server:
    python3 -m sglang.launch_server \
        --model-path "shareAI/CodeLlama-13b-English-Chat" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "shareAI/CodeLlama-13b-English-Chat",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker images
    docker run --gpus all \
        --shm-size 32g \
        -p 30000:30000 \
        -v ~/.cache/huggingface:/root/.cache/huggingface \
        --env "HF_TOKEN=<secret>" \
        --ipc=host \
        lmsysorg/sglang:latest \
        python3 -m sglang.launch_server \
            --model-path "shareAI/CodeLlama-13b-English-Chat" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "shareAI/CodeLlama-13b-English-Chat",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use shareAI/CodeLlama-13b-English-Chat with Docker Model Runner:

    docker model run hf.co/shareAI/CodeLlama-13b-English-Chat
CodeLlama-13b-English-Chat
26 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
Baicai003's picture
Baicai003
Rename README.MD to README.md
1fd404b almost 3 years ago
  • .gitattributes
    1.57 kB
    first commit almost 3 years ago
  • LICENSE
    85 Bytes
    first commit almost 3 years ago
  • MODEL_CARD.md
    4.25 kB
    first commit almost 3 years ago
  • README.md
    2.23 kB
    Rename README.MD to README.md almost 3 years ago
  • USE_POLICY.md
    105 Bytes
    first commit almost 3 years ago
  • config.json
    923 Bytes
    first commit almost 3 years ago
  • configuration_llama.py
    8.56 kB
    first commit almost 3 years ago
  • generation_config.json
    111 Bytes
    first commit almost 3 years ago
  • modeling_llama.py
    45.9 kB
    first commit almost 3 years ago
  • pytorch_model-00001-of-00003.bin
    9.95 GB
    xet
    first commit almost 3 years ago
  • pytorch_model-00002-of-00003.bin
    9.9 GB
    xet
    first commit almost 3 years ago
  • pytorch_model-00003-of-00003.bin
    6.18 GB
    xet
    first commit almost 3 years ago
  • pytorch_model.bin.index.json
    29.9 kB
    first commit almost 3 years ago
  • special_tokens_map.json
    411 Bytes
    first commit almost 3 years ago
  • tokenizer.json
    1.84 MB
    first commit almost 3 years ago
  • tokenizer.model
    500 kB
    xet
    first commit almost 3 years ago
  • tokenizer_config.json
    824 Bytes
    first commit almost 3 years ago