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

spidyun
/
kmoshi

Text Generation
Transformers
Safetensors
Moshi
kmoshi
full-duplex
speech
korean
conversational
Model card Files Files and versions
xet
Community

Instructions to use spidyun/kmoshi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use spidyun/kmoshi with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="spidyun/kmoshi")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoModelForSeq2SeqLM
    model = AutoModelForSeq2SeqLM.from_pretrained("spidyun/kmoshi", device_map="auto")
  • Moshi

    How to use spidyun/kmoshi with Moshi:

    # pip install moshi
    # Run the interactive web server
    python -m moshi.server --hf-repo "spidyun/kmoshi"
    # Then open https://localhost:8998 in your browser
    # pip install moshi
    import torch
    from moshi.models import loaders
    
    # Load checkpoint info from HuggingFace
    checkpoint = loaders.CheckpointInfo.from_hf_repo("spidyun/kmoshi")
    
    # Load the Mimi audio codec
    mimi = checkpoint.get_mimi(device="cuda")
    mimi.set_num_codebooks(8)
    
    # Encode audio (24kHz, mono)
    wav = torch.randn(1, 1, 24000 * 10)  # [batch, channels, samples]
    with torch.no_grad():
        codes = mimi.encode(wav.cuda())
        decoded = mimi.decode(codes)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use spidyun/kmoshi with vLLM:

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

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

    How to use spidyun/kmoshi with Docker Model Runner:

    docker model run hf.co/spidyun/kmoshi
kmoshi
19.9 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
spidyun's picture
spidyun
Upload folder using huggingface_hub
0f48a55 verified 25 days ago
  • .gitattributes
    1.57 kB
    Upload folder using huggingface_hub 25 days ago
  • LICENSE
    520 Bytes
    Upload folder using huggingface_hub 25 days ago
  • Notice
    68 Bytes
    Upload folder using huggingface_hub 25 days ago
  • README.md
    1.8 kB
    Upload folder using huggingface_hub 25 days ago
  • chat_template.jinja
    4.17 kB
    Upload folder using huggingface_hub 25 days ago
  • config.json
    2.71 kB
    Upload folder using huggingface_hub 25 days ago
  • generation_config.json
    393 Bytes
    Upload folder using huggingface_hub 25 days ago
  • model.safetensors
    19.9 GB
    xet
    Upload folder using huggingface_hub 25 days ago
  • tokenizer.json
    11.4 MB
    xet
    Upload folder using huggingface_hub 25 days ago
  • tokenizer_config.json
    694 Bytes
    Upload folder using huggingface_hub 25 days ago