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

ibm-ai-platform
/
Bamba-9B-2T

Text Generation
Transformers
Safetensors
bamba
Model card Files Files and versions
xet
Community
1

Instructions to use ibm-ai-platform/Bamba-9B-2T with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use ibm-ai-platform/Bamba-9B-2T with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="ibm-ai-platform/Bamba-9B-2T")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("ibm-ai-platform/Bamba-9B-2T")
    model = AutoModelForCausalLM.from_pretrained("ibm-ai-platform/Bamba-9B-2T")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use ibm-ai-platform/Bamba-9B-2T with vLLM:

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

    How to use ibm-ai-platform/Bamba-9B-2T 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 "ibm-ai-platform/Bamba-9B-2T" \
        --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": "ibm-ai-platform/Bamba-9B-2T",
    		"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 "ibm-ai-platform/Bamba-9B-2T" \
            --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": "ibm-ai-platform/Bamba-9B-2T",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use ibm-ai-platform/Bamba-9B-2T with Docker Model Runner:

    docker model run hf.co/ibm-ai-platform/Bamba-9B-2T
Bamba-9B-2T
19.6 GB
Ctrl+K
Ctrl+K
  • 4 contributors
History: 5 commits
rganti's picture
rganti
ariG23498's picture
ariG23498 HF Staff
Update README.md (#1)
cb7b70f verified over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    12.7 kB
    Update README.md (#1) over 1 year ago
  • config.json
    886 Bytes
    Weights upload over 1 year ago
  • model-00001-of-00004.safetensors
    4.95 GB
    xet
    Weights upload over 1 year ago
  • model-00002-of-00004.safetensors
    4.89 GB
    xet
    Weights upload over 1 year ago
  • model-00003-of-00004.safetensors
    4.89 GB
    xet
    Weights upload over 1 year ago
  • model-00004-of-00004.safetensors
    4.83 GB
    xet
    Weights upload over 1 year ago
  • model.safetensors.index.json
    32.5 kB
    Weights upload over 1 year ago
  • special_tokens_map.json
    301 Bytes
    Added tokenizer files over 1 year ago
  • tokenizer.json
    9.09 MB
    Added tokenizer files over 1 year ago
  • tokenizer_config.json
    50.6 kB
    Added tokenizer files over 1 year ago