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

  • Log In
  • Sign Up

onnx-internal-testing
/
tiny-random-ModernBertDecoderForCausalLM

Text Generation
Transformers
Safetensors
modernbert-decoder
Model card Files Files and versions
xet
Community
1

Instructions to use onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM")
    model = AutoModelForCausalLM.from_pretrained("onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM with vLLM:

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

    How to use onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM 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 "onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM" \
        --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": "onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM",
    		"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 "onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM" \
            --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": "onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM with Docker Model Runner:

    docker model run hf.co/onnx-internal-testing/tiny-random-ModernBertDecoderForCausalLM
tiny-random-ModernBertDecoderForCausalLM
10.3 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 4 commits
Xenova's picture
Xenova HF Staff
tomaarsen's picture
tomaarsen HF Staff
Match "layer_types" length with "num_hidden_layers" (#1)
0668913 about 1 month ago
  • .gitattributes
    1.52 kB
    initial commit 10 months ago
  • README.md
    5.17 kB
    Upload ModernBertDecoderForCausalLM 10 months ago
  • config.json
    1.45 kB
    Match "layer_types" length with "num_hidden_layers" (#1) about 1 month ago
  • generation_config.json
    149 Bytes
    Upload ModernBertDecoderForCausalLM 10 months ago
  • model.safetensors
    6.71 MB
    xet
    Upload ModernBertDecoderForCausalLM 10 months ago
  • special_tokens_map.json
    970 Bytes
    Upload tokenizer 10 months ago
  • tokenizer.json
    3.58 MB
    Upload tokenizer 10 months ago
  • tokenizer_config.json
    21 kB
    Upload tokenizer 10 months ago