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

  • Log In
  • Sign Up

sii-research
/
InnoMegrez2-Preview

Text Generation
Transformers
Safetensors
English
Chinese
megrez_moe
Mixture of Experts
conversational
custom_code
Model card Files Files and versions
xet
Community

Instructions to use sii-research/InnoMegrez2-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use sii-research/InnoMegrez2-Preview with Transformers:

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

    How to use sii-research/InnoMegrez2-Preview with vLLM:

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

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

    How to use sii-research/InnoMegrez2-Preview with Docker Model Runner:

    docker model run hf.co/sii-research/InnoMegrez2-Preview
InnoMegrez2-Preview
15 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 9 commits
zyq
fix rope
5aa594b 10 months ago
  • assets
    update readme and model file 10 months ago
  • .gitattributes
    1.6 kB
    update readme and model file 10 months ago
  • README.md
    8.21 kB
    fix rope 10 months ago
  • README_ZH.md
    7.85 kB
    fix rope 10 months ago
  • chat_template.jinja
    425 Bytes
    update readme and model file 10 months ago
  • config.json
    1.32 kB
    fix rope 10 months ago
  • configuration_megrez_moe.py
    10.1 kB
    update readme and model file 10 months ago
  • generation_config.json
    121 Bytes
    update readme and model file 10 months ago
  • model-00001-of-00004.safetensors
    5 GB
    xet
    update readme and model file 10 months ago
  • model-00002-of-00004.safetensors
    5 GB
    xet
    update readme and model file 10 months ago
  • model-00003-of-00004.safetensors
    4.48 GB
    xet
    update readme and model file 10 months ago
  • model-00004-of-00004.safetensors
    528 MB
    xet
    update readme and model file 10 months ago
  • model.safetensors.index.json
    199 kB
    update readme and model file 10 months ago
  • modeling_megrez_moe.py
    46.7 kB
    update readme and model file 10 months ago
  • special_tokens_map.json
    288 Bytes
    update readme and model file 10 months ago
  • tokenizer.json
    9.26 MB
    update readme and model file 10 months ago
  • tokenizer_config.json
    5.43 kB
    update readme and model file 10 months ago