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
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

JetBrains
/
Mellum2-12B-A2.5B-Thinking-SFT

Text Generation
Transformers
Safetensors
English
mellum
conversational
Eval Results (legacy)
Eval Results
Model card Files Files and versions
xet
Community
4

Instructions to use JetBrains/Mellum2-12B-A2.5B-Thinking-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use JetBrains/Mellum2-12B-A2.5B-Thinking-SFT with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="JetBrains/Mellum2-12B-A2.5B-Thinking-SFT")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("JetBrains/Mellum2-12B-A2.5B-Thinking-SFT")
    model = AutoModelForCausalLM.from_pretrained("JetBrains/Mellum2-12B-A2.5B-Thinking-SFT")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    inputs = tokenizer.apply_chat_template(
    	messages,
    	add_generation_prompt=True,
    	tokenize=True,
    	return_dict=True,
    	return_tensors="pt",
    ).to(model.device)
    
    outputs = model.generate(**inputs, max_new_tokens=40)
    print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use JetBrains/Mellum2-12B-A2.5B-Thinking-SFT with vLLM:

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

    How to use JetBrains/Mellum2-12B-A2.5B-Thinking-SFT 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 "JetBrains/Mellum2-12B-A2.5B-Thinking-SFT" \
        --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": "JetBrains/Mellum2-12B-A2.5B-Thinking-SFT",
    		"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 "JetBrains/Mellum2-12B-A2.5B-Thinking-SFT" \
            --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": "JetBrains/Mellum2-12B-A2.5B-Thinking-SFT",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use JetBrains/Mellum2-12B-A2.5B-Thinking-SFT with Docker Model Runner:

    docker model run hf.co/JetBrains/Mellum2-12B-A2.5B-Thinking-SFT
Mellum2-12B-A2.5B-Thinking-SFT
24.3 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 9 commits
pavlichenko's picture
pavlichenko
Update README.md
6dc4923 verified 7 days ago
  • .eval_results
    Update model card and add evaluation results (#2) 11 days ago
  • .gitattributes
    1.52 kB
    initial commit 13 days ago
  • README.md
    6.46 kB
    Update README.md 7 days ago
  • chat_template.jinja
    4.88 kB
    Add files using upload-large-folder tool 13 days ago
  • config.json
    2.29 kB
    Finalize config (#1) 13 days ago
  • generation_config.json
    111 Bytes
    Add files using upload-large-folder tool 13 days ago
  • mellum-logo-dark.svg
    5.18 kB
    Add logo to model card 10 days ago
  • model-00001-of-00005.safetensors
    5 GB
    xet
    Add files using upload-large-folder tool 13 days ago
  • model-00002-of-00005.safetensors
    5 GB
    xet
    Add files using upload-large-folder tool 13 days ago
  • model-00003-of-00005.safetensors
    5 GB
    xet
    Add files using upload-large-folder tool 13 days ago
  • model-00004-of-00005.safetensors
    5 GB
    xet
    Add files using upload-large-folder tool 13 days ago
  • model-00005-of-00005.safetensors
    4.31 GB
    xet
    Add files using upload-large-folder tool 13 days ago
  • model.safetensors.index.json
    527 kB
    Add files using upload-large-folder tool 13 days ago
  • special_tokens_map.json
    1.19 kB
    Add files using upload-large-folder tool 13 days ago
  • tokenizer.json
    7.09 MB
    Add files using upload-large-folder tool 13 days ago
  • tokenizer_config.json
    7.03 kB
    Add files using upload-large-folder tool 13 days ago