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

nyu-visionx
/
cambrian-phi3-3b

Text Generation
Transformers
Safetensors
cambrian_phi3
conversational
custom_code
Model card Files Files and versions
xet
Community
1

Instructions to use nyu-visionx/cambrian-phi3-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use nyu-visionx/cambrian-phi3-3b with Transformers:

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

    How to use nyu-visionx/cambrian-phi3-3b with vLLM:

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

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

    How to use nyu-visionx/cambrian-phi3-3b with Docker Model Runner:

    docker model run hf.co/nyu-visionx/cambrian-phi3-3b
cambrian-phi3-3b
Ctrl+K
Ctrl+K
  • 2 contributors
History: 5 commits
tsbpp's picture
tsbpp
Upload phi3_results.png
bb6fb4f verified about 2 years ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • added_tokens.json
    293 Bytes
    add model about 2 years ago
  • config.json
    2.19 kB
    fix name about 2 years ago
  • generation_config.json
    193 Bytes
    add model about 2 years ago
  • model-00001-of-00004.safetensors
    4.96 GB
    xet
    add model about 2 years ago
  • model-00002-of-00004.safetensors
    4.98 GB
    xet
    add model about 2 years ago
  • model-00003-of-00004.safetensors
    5 GB
    xet
    add model about 2 years ago
  • model-00004-of-00004.safetensors
    1.44 GB
    xet
    add model about 2 years ago
  • model.safetensors.index.json
    66.9 kB
    add model about 2 years ago
  • phi3_results.png
    292 kB
    Upload phi3_results.png about 2 years ago
  • special_tokens_map.json
    447 Bytes
    add model about 2 years ago
  • tokenizer.model
    500 kB
    xet
    add model about 2 years ago
  • tokenizer_config.json
    3.2 kB
    add model about 2 years ago
  • training_args.bin

    Detected Pickle imports (10)

    • "transformers.trainer_utils.FSDPOption",
    • "torch.bfloat16",
    • "accelerate.state.PartialState",
    • "accelerate.utils.dataclasses.DistributedType",
    • "transformers.trainer_utils.IntervalStrategy",
    • "transformers.training_args.OptimizerNames",
    • "torch.device",
    • "transformers.trainer_utils.HubStrategy",
    • "llava.train.train_fsdp.TrainingArguments",
    • "transformers.trainer_utils.SchedulerType"

    How to fix it?

    5.94 kB
    xet
    add model about 2 years ago