Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

OpenMOSS-Team
/
moss-moon-003-sft-int8

Text Generation
Transformers
PyTorch
English
Chinese
moss
llm
custom_code
Model card Files Files and versions
xet
Community

Instructions to use OpenMOSS-Team/moss-moon-003-sft-int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use OpenMOSS-Team/moss-moon-003-sft-int8 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="OpenMOSS-Team/moss-moon-003-sft-int8", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/moss-moon-003-sft-int8", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use OpenMOSS-Team/moss-moon-003-sft-int8 with vLLM:

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

    How to use OpenMOSS-Team/moss-moon-003-sft-int8 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 "OpenMOSS-Team/moss-moon-003-sft-int8" \
        --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": "OpenMOSS-Team/moss-moon-003-sft-int8",
    		"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 "OpenMOSS-Team/moss-moon-003-sft-int8" \
            --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": "OpenMOSS-Team/moss-moon-003-sft-int8",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use OpenMOSS-Team/moss-moon-003-sft-int8 with Docker Model Runner:

    docker model run hf.co/OpenMOSS-Team/moss-moon-003-sft-int8
moss-moon-003-sft-int8
Ctrl+K
Ctrl+K
  • 2 contributors
History: 34 commits
Hzfinfdu's picture
Hzfinfdu
Update quantization.py
826db75 about 3 years ago
  • .gitattributes
    1.48 kB
    initial commit about 3 years ago
  • README.md
    31.8 kB
    Update README.md about 3 years ago
  • added_tokens.json
    1.21 kB
    Upload added_tokens.json with huggingface_hub about 3 years ago
  • config.json
    1.22 kB
    Upload config.json with huggingface_hub about 3 years ago
  • configuration_moss.py
    5.1 kB
    Upload configuration_moss.py with huggingface_hub about 3 years ago
  • custom_autotune.py
    6.74 kB
    Upload custom_autotune.py with huggingface_hub about 3 years ago
  • merges.txt
    1.34 MB
    Upload merges.txt with huggingface_hub about 3 years ago
  • modeling_moss.py
    31.2 kB
    Upload modeling_moss.py with huggingface_hub about 3 years ago
  • pytorch_model.bin
    18.5 GB
    xet
    Upload pytorch_model.bin with huggingface_hub about 3 years ago
  • quantization.py
    18.7 kB
    Update quantization.py about 3 years ago
  • special_tokens_map.json
    931 Bytes
    Upload special_tokens_map.json with huggingface_hub about 3 years ago
  • tokenization_moss.py
    16 kB
    Upload tokenization_moss.py with huggingface_hub about 3 years ago
  • tokenizer_config.json
    844 Bytes
    Upload tokenizer_config.json with huggingface_hub about 3 years ago
  • vocab.json
    2.5 MB
    Upload vocab.json with huggingface_hub about 3 years ago