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

meta-llama
/
Meta-Llama-3-70B

Text Generation
Transformers
Safetensors
PyTorch
English
llama
facebook
meta
llama-3
text-generation-inference
Model card Files Files and versions
xet
Community
24

Instructions to use meta-llama/Meta-Llama-3-70B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use meta-llama/Meta-Llama-3-70B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-3-70B")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-70B")
    model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-70B")
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use meta-llama/Meta-Llama-3-70B with vLLM:

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

    How to use meta-llama/Meta-Llama-3-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 "meta-llama/Meta-Llama-3-70B" \
        --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": "meta-llama/Meta-Llama-3-70B",
    		"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 "meta-llama/Meta-Llama-3-70B" \
            --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": "meta-llama/Meta-Llama-3-70B",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use meta-llama/Meta-Llama-3-70B with Docker Model Runner:

    docker model run hf.co/meta-llama/Meta-Llama-3-70B
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

[READ IF YOU DO NOT HAVE ACCESS] Getting access to the model

pinned
1
#15 opened almost 2 years ago by
osanseviero

fix: set `clean_up_tokenization_spaces` to `false`

#24 opened about 2 months ago by
maxsloef

I want to use Meta-llama-3-70b

#23 opened about 1 year ago by
Saipgs24003

Request: DOI

#22 opened over 1 year ago by
kouki001

Model being very repetitive

#21 opened over 1 year ago by
pgusand

llama3-70-B is not loding properly on GPU

#18 opened almost 2 years ago by
vishal324

Insert a correct model card name from GitHub

#17 opened almost 2 years ago by
Andron00e

Add co2_eq_emissions to README so that the HF API exposes this info to users.

#16 opened almost 2 years ago by
selenecodes

Does anyone know which specific Python library contains the tokenizer that was used to train Llama-3-70b?

👍 1
2
#11 opened about 2 years ago by
BigDeeper

15 TeraTokens = 190 Million books

2
#4 opened about 2 years ago by
Languido

Update numbering format of Prohibited Uses

#3 opened about 2 years ago by
BallisticAI
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs