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

OpenMOSS-Team
/
DiRL-8B-Instruct

Text Generation
Transformers
Safetensors
English
Chinese
sdar
math
reasoning
diffusion
conversational
custom_code
Model card Files Files and versions
xet
Community
1

Instructions to use OpenMOSS-Team/DiRL-8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use OpenMOSS-Team/DiRL-8B-Instruct with Transformers:

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

    How to use OpenMOSS-Team/DiRL-8B-Instruct with vLLM:

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

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

    How to use OpenMOSS-Team/DiRL-8B-Instruct with Docker Model Runner:

    docker model run hf.co/OpenMOSS-Team/DiRL-8B-Instruct
DiRL-8B-Instruct
16.4 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 10 commits
Auraithm's picture
Auraithm
Update modeling_sdar.py
898c2ea verified 8 months ago
  • .gitattributes
    1.52 kB
  • README.md
    3.66 kB
  • added_tokens.json
    729 Bytes
  • chat_template.jinja
    4.12 kB
  • config.json
    1.13 kB
  • configuration_sdar.py
    11.2 kB
  • fused_linear_diffusion_cross_entropy.py
    23.8 kB
  • generation_config.json
    214 Bytes
  • merges.txt
    1.67 MB
  • model-00001-of-00004.safetensors
    4.9 GB
    xet
  • model-00002-of-00004.safetensors
    4.92 GB
    xet
  • model-00003-of-00004.safetensors
    4.98 GB
    xet
  • model-00004-of-00004.safetensors
    1.58 GB
    xet
  • model.safetensors.index.json
    32.9 kB
  • modeling_sdar.py
    60.5 kB
  • special_tokens_map.json
    774 Bytes
  • tokenization_qwen2.py
    14 kB
  • tokenization_qwen2_fast.py
    5.25 kB
  • tokenizer_config.json
    5.73 kB
  • vocab.json
    3.38 MB