Text Generation
Transformers
Safetensors
English
Chinese
Russian
yue2
music-generation
orbitquant
quantization
4-bit precision
custom-code
8-bit precision
Instructions to use WaveCut/YuE2-3B-OrbitQuant-W4A4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WaveCut/YuE2-3B-OrbitQuant-W4A4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WaveCut/YuE2-3B-OrbitQuant-W4A4")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("WaveCut/YuE2-3B-OrbitQuant-W4A4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WaveCut/YuE2-3B-OrbitQuant-W4A4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WaveCut/YuE2-3B-OrbitQuant-W4A4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WaveCut/YuE2-3B-OrbitQuant-W4A4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WaveCut/YuE2-3B-OrbitQuant-W4A4
- SGLang
How to use WaveCut/YuE2-3B-OrbitQuant-W4A4 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 "WaveCut/YuE2-3B-OrbitQuant-W4A4" \ --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": "WaveCut/YuE2-3B-OrbitQuant-W4A4", "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 "WaveCut/YuE2-3B-OrbitQuant-W4A4" \ --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": "WaveCut/YuE2-3B-OrbitQuant-W4A4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WaveCut/YuE2-3B-OrbitQuant-W4A4 with Docker Model Runner:
docker model run hf.co/WaveCut/YuE2-3B-OrbitQuant-W4A4
File size: 1,834 Bytes
f0c91ec | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | [general]
name = "orbitquant-packed-matmul"
version = 1
edition = 5
license = "Apache-2.0"
backends = ["cpu", "cuda", "metal"]
upstream = "https://github.com/iamwavecut/OrbitQuant"
source = "https://huggingface.co/WaveCut/orbitquant-packed-matmul"
[general.hub]
repo-id = "WaveCut/orbitquant-packed-matmul"
[torch]
src = [
"torch-ext/torch_binding.cpp",
"torch-ext/torch_binding.h",
]
[torch.stable-abi]
cpu = "2.11"
[kernel.packed_matmul_cpu]
backend = "cpu"
depends = ["torch"]
include = ["orbitquant_packed_matmul_cpu"]
src = [
"orbitquant_packed_matmul_cpu/cpu_isa.cpp",
"orbitquant_packed_matmul_cpu/cpu_kernel_args.h",
"orbitquant_packed_matmul_cpu/cpu_pool.cpp",
"orbitquant_packed_matmul_cpu/cpu_pool.h",
"orbitquant_packed_matmul_cpu/cpu_threads.cpp",
"orbitquant_packed_matmul_cpu/cpu_threads.h",
"orbitquant_packed_matmul_cpu/packed_adaln_cpu.cpp",
"orbitquant_packed_matmul_cpu/packed_matmul_cpu.cpp",
"orbitquant_packed_matmul_cpu/packed_matmul_cpu.h",
"orbitquant_packed_matmul_cpu/packed_matmul_scalar.cpp",
"orbitquant_packed_matmul_cpu/packed_matmul_neon.cpp",
"orbitquant_packed_matmul_cpu/packed_matmul_x86_avx512.cpp",
"orbitquant_packed_matmul_cpu/quantize_activations_cpu.cpp",
]
[kernel.packed_matmul_cpu_x86_avx2]
backend = "cpu"
depends = ["torch"]
include = ["orbitquant_packed_matmul_cpu"]
cxx-flags = ["$<$<CXX_COMPILER_ID:MSVC>:/arch:AVX2>"]
src = [
"orbitquant_packed_matmul_cpu/cpu_msvc_avx2.cpp",
"orbitquant_packed_matmul_cpu/packed_matmul_x86.cpp",
]
[kernel.packed_matmul_cuda]
backend = "cuda"
depends = ["torch"]
src = ["orbitquant_packed_matmul_cuda/packed_matmul.cu"]
[kernel.packed_matmul_metal]
backend = "metal"
depends = ["torch"]
src = [
"orbitquant_packed_matmul_metal/packed_matmul.mm",
"orbitquant_packed_matmul_metal/packed_matmul.metal",
]
|