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

robertmyers
/
sakura-3b

Text Generation
Transformers
PyTorch
btlm
custom_code
Model card Files Files and versions
xet
Community

Instructions to use robertmyers/sakura-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use robertmyers/sakura-3b with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="robertmyers/sakura-3b", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("robertmyers/sakura-3b", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use robertmyers/sakura-3b with vLLM:

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

    How to use robertmyers/sakura-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 "robertmyers/sakura-3b" \
        --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": "robertmyers/sakura-3b",
    		"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 "robertmyers/sakura-3b" \
            --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": "robertmyers/sakura-3b",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use robertmyers/sakura-3b with Docker Model Runner:

    docker model run hf.co/robertmyers/sakura-3b
sakura-3b
10.6 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 3 commits
3v324v23's picture
3v324v23
first commit
85fdfd3 almost 3 years ago
  • wandb
    first commit almost 3 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 3 years ago
  • added_tokens.json
    21 Bytes
    first commit almost 3 years ago
  • arguments.json
    1.39 kB
    first commit almost 3 years ago
  • arguments.pkl

    Detected Pickle imports (3)

    • "argparse.Namespace",
    • "transformers.trainer_utils.SchedulerType",
    • "torch.device"

    How to fix it?

    1.01 kB
    xet
    first commit almost 3 years ago
  • config.json
    1.41 kB
    first commit almost 3 years ago
  • environ.txt
    2.79 kB
    first commit almost 3 years ago
  • latest
    14 Bytes
    first commit almost 3 years ago
  • merges.txt
    456 kB
    first commit almost 3 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

    • "torch.BFloat16Storage",
    • "torch._utils._rebuild_tensor_v2",
    • "torch.FloatStorage",
    • "collections.OrderedDict"

    What is a pickle import?

    10.6 GB
    xet
    first commit almost 3 years ago
  • script.sh
    2.8 kB
    first commit almost 3 years ago
  • special_tokens_map.json
    123 Bytes
    first commit almost 3 years ago
  • stderr.log
    181 kB
    first commit almost 3 years ago
  • stdout.log
    7.06 kB
    first commit almost 3 years ago
  • tokenizer.json
    2.11 MB
    first commit almost 3 years ago
  • tokenizer_config.json
    754 Bytes
    first commit almost 3 years ago
  • vocab.json
    798 kB
    first commit almost 3 years ago
  • zero_to_fp32.py
    23.6 kB
    first commit almost 3 years ago