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

MaziyarPanahi
/
calme-2.2-llama3.1-70b

Text Generation
Transformers
Safetensors
English
llama
chat
facebook
llaam3
finetune
chatml
conversational
Eval Results (legacy)
text-generation-inference
Model card Files Files and versions
xet
Community
7

Instructions to use MaziyarPanahi/calme-2.2-llama3.1-70b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use MaziyarPanahi/calme-2.2-llama3.1-70b with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="MaziyarPanahi/calme-2.2-llama3.1-70b")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-2.2-llama3.1-70b")
    model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/calme-2.2-llama3.1-70b", device_map="auto")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    inputs = tokenizer.apply_chat_template(
    	messages,
    	add_generation_prompt=True,
    	tokenize=True,
    	return_dict=True,
    	return_tensors="pt",
    ).to(model.device)
    
    outputs = model.generate(**inputs, max_new_tokens=40)
    print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use MaziyarPanahi/calme-2.2-llama3.1-70b with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "MaziyarPanahi/calme-2.2-llama3.1-70b"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "MaziyarPanahi/calme-2.2-llama3.1-70b",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/MaziyarPanahi/calme-2.2-llama3.1-70b
  • SGLang

    How to use MaziyarPanahi/calme-2.2-llama3.1-70b 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 "MaziyarPanahi/calme-2.2-llama3.1-70b" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "MaziyarPanahi/calme-2.2-llama3.1-70b",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    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 "MaziyarPanahi/calme-2.2-llama3.1-70b" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "MaziyarPanahi/calme-2.2-llama3.1-70b",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use MaziyarPanahi/calme-2.2-llama3.1-70b with Docker Model Runner:

    docker model run hf.co/MaziyarPanahi/calme-2.2-llama3.1-70b
calme-2.2-llama3.1-70b
38.2 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 9 commits
MaziyarPanahi's picture
MaziyarPanahi
4543f6b2a079acb7398a5f4fcc6b5bf825d82817f3ef66c11046705aa4332552
9d1a46e verified about 2 years ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • model-00001-of-00030.safetensors
    4.58 GB
    xet
    dd4673ae99242312229301069cd467728108233e1ec295e139f90c42bdcadea6 about 2 years ago
  • model-00002-of-00030.safetensors
    4.66 GB
    xet
    903a0d491dd970652e65608c67db84aa999e17ae9c474d842538b1364264cdec about 2 years ago
  • model-00003-of-00030.safetensors
    5 GB
    xet
    e81fdadc371efce695981a26654e3de51dfe41862685d95a5ccfb6edecdaca99 about 2 years ago
  • model-00004-of-00030.safetensors
    4.97 GB
    xet
    aa03d0b9e0bf4e5352c7660d20cf85e0c5962cc498f18ef4f749a4f984e8607e about 2 years ago
  • model-00005-of-00030.safetensors
    4.66 GB
    xet
    b35e0226f7abefd5abf87cfb1a34d0a78cd5014678a933b23ce2d09ff35f60bd about 2 years ago
  • model-00006-of-00030.safetensors
    4.66 GB
    xet
    9ffe9f515328768810bdc950fafcb53dad074996208e556ed33af7ef73ffa88e about 2 years ago
  • model-00007-of-00030.safetensors
    4.66 GB
    xet
    9c52e04167420fe0b9b0b184fd8d3e651f90b06beda17e7e1401f0eacd4c960c about 2 years ago
  • model-00008-of-00030.safetensors
    5 GB
    xet
    4543f6b2a079acb7398a5f4fcc6b5bf825d82817f3ef66c11046705aa4332552 about 2 years ago