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

BAAI
/
AquilaDense-7B

Text Generation
Transformers
PyTorch
English
Chinese
aquiladense
Mixture of Experts
conversational
custom_code
Model card Files Files and versions
xet
Community
1

Instructions to use BAAI/AquilaDense-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use BAAI/AquilaDense-7B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="BAAI/AquilaDense-7B", trust_remote_code=True)
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("BAAI/AquilaDense-7B", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use BAAI/AquilaDense-7B with vLLM:

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

    How to use BAAI/AquilaDense-7B 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 "BAAI/AquilaDense-7B" \
        --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": "BAAI/AquilaDense-7B",
    		"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 "BAAI/AquilaDense-7B" \
            --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": "BAAI/AquilaDense-7B",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use BAAI/AquilaDense-7B with Docker Model Runner:

    docker model run hf.co/BAAI/AquilaDense-7B
AquilaDense-7B / assets
734 kB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 5 commits
ldwang's picture
ldwang
Upload 2 files
f4ca900 verified almost 2 years ago
  • 1280X1280.PNG
    181 kB
    Upload assets/1280X1280.PNG with huggingface_hub almost 2 years ago
  • 4d716d22-98b1-4f15-a40e-f16070cf76fa.png
    153 kB
    Upload 2 files almost 2 years ago
  • 6eea11dd-4554-44ca-9459-f5e0177b510b.png
    237 kB
    Upload assets/6eea11dd-4554-44ca-9459-f5e0177b510b.png with huggingface_hub almost 2 years ago
  • baai.png
    105 kB
    Upload 2 files almost 2 years ago
  • wechat-qrcode.jpg
    58.4 kB
    Upload assets/wechat-qrcode.jpg with huggingface_hub almost 2 years ago