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

TheBloke
/
Mixtral-8x7B-Instruct-v0.1-AWQ

Text Generation
Transformers
Safetensors
mixtral
conversational
text-generation-inference
4-bit precision
awq
Model card Files Files and versions
xet
Community
10

Instructions to use TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ")
    model = AutoModelForCausalLM.from_pretrained("TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ", 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]:]))
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ with vLLM:

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

    How to use TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ 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 "TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ" \
        --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": "TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ",
    		"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 "TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ" \
            --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": "TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ with Docker Model Runner:

    docker model run hf.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Use ybelkada/Mixtral-8x7B-Instruct-v0.1-AWQ with VLLM instead

πŸ‘ 3
1
#10 opened over 2 years ago by
blobpenguin

Inference taking too much time

3
#9 opened over 2 years ago by
tariksetia

Update README.md

#8 opened over 2 years ago by
skoita

RuntimeError: probability tensor contains either `inf`, `nan` or element < 0

2
#7 opened over 2 years ago by
aaganaie

TGI - response is an empty string

2
#6 opened over 2 years ago by
p-christ

OC is not a multiple of cta_N = 64

2
#5 opened over 2 years ago by
lazyDataScientist

Not supporting with TGI

1
#4 opened over 2 years ago by
abhishek3jangid

always getting 0 in output

πŸ‘ 4
15
#3 opened over 2 years ago by
xubuild

OOM under vLLM even with 80GB GPU

5
#2 opened over 2 years ago by
mike-ravkine

Not supported for TGI > 1.3 ?

πŸ‘ 1
20
#1 opened almost 3 years ago by
paulcx
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs