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

HCHs
/
RivetCoder-9B-A4B

Text Generation
Transformers
Safetensors
English
Korean
code
fuse_glm
custom_code
lfm2
glm
mixture-of-experts
routed-experts
coding
code-generation
agentic
bf16
top-k-routing
trust-remote-code
conversational
Model card Files Files and versions
xet
Community

Instructions to use HCHs/RivetCoder-9B-A4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use HCHs/RivetCoder-9B-A4B with Transformers:

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

    How to use HCHs/RivetCoder-9B-A4B with vLLM:

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

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

    How to use HCHs/RivetCoder-9B-A4B with Docker Model Runner:

    docker model run hf.co/HCHs/RivetCoder-9B-A4B
RivetCoder-9B-A4B / provenance
3.05 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
HCHs's picture
HCHs
Correct packaging note and refresh checksums
9a90b19 verified 16 days ago
  • assembly.json
    8.89 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • bridge.json
    1.4 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • checksums.sha256
    3.5 kB
    Correct packaging note and refresh checksums 16 days ago
  • expert-selection.json
    390 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • folding.json
    1.49 MB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • fusion-plan.json
    12.1 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • pre-repack-index.json
    190 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • router-training.json
    14.2 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • selected-expert-tensors.json
    895 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • source-models.json
    781 Bytes
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • training-data-manifest.json
    2.78 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • training-summary.json
    37.7 kB
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago
  • validation-metrics.json
    343 Bytes
    Upload RivetCoder-9B-A4B v0.1.0 16 days ago