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

akoumpa
/
Moonlight-V4-1B-h16d256

Text Generation
Transformers
deepseek_v4
mixture-of-experts
Mixture of Experts
hybrid-attention
compressed-sparse-attention
hyper-connections
mhc
architecture-config
untrained
from-scratch
nemo-automodel
moonlight
Model card Files Files and versions
xet
Community

Instructions to use akoumpa/Moonlight-V4-1B-h16d256 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use akoumpa/Moonlight-V4-1B-h16d256 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="akoumpa/Moonlight-V4-1B-h16d256")
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("akoumpa/Moonlight-V4-1B-h16d256")
    model = AutoModelForCausalLM.from_pretrained("akoumpa/Moonlight-V4-1B-h16d256", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use akoumpa/Moonlight-V4-1B-h16d256 with vLLM:

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

    How to use akoumpa/Moonlight-V4-1B-h16d256 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 "akoumpa/Moonlight-V4-1B-h16d256" \
        --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": "akoumpa/Moonlight-V4-1B-h16d256",
    		"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 "akoumpa/Moonlight-V4-1B-h16d256" \
            --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": "akoumpa/Moonlight-V4-1B-h16d256",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use akoumpa/Moonlight-V4-1B-h16d256 with Docker Model Runner:

    docker model run hf.co/akoumpa/Moonlight-V4-1B-h16d256
Moonlight-V4-1B-h16d256
6.42 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
akoumpa's picture
akoumpa
Tokenizer loading notes (PreTrainedTokenizerFast) and data-prep script fix
6c809e5 verified 22 days ago
  • training
    Tokenizer loading notes (PreTrainedTokenizerFast) and data-prep script fix 22 days ago
  • .gitattributes
    1.52 kB
    initial commit 22 days ago
  • README.md
    12.1 kB
    Tokenizer loading notes (PreTrainedTokenizerFast) and data-prep script fix 22 days ago
  • config.json
    1.31 kB
    Add Moonlight-V4-1B variant config, tokenizer, model card and training helpers 22 days ago
  • count_params.py
    15.4 kB
    Add Moonlight-V4-1B variant config, tokenizer, model card and training helpers 22 days ago
  • inference_config.json
    842 Bytes
    Add Moonlight-V4-1B variant config, tokenizer, model card and training helpers 22 days ago
  • tokenizer.json
    6.37 MB
    Add Moonlight-V4-1B variant config, tokenizer, model card and training helpers 22 days ago
  • tokenizer_config.json
    801 Bytes
    Add Moonlight-V4-1B variant config, tokenizer, model card and training helpers 22 days ago