Instructions to use MarsupialAI/Monstral-123B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MarsupialAI/Monstral-123B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MarsupialAI/Monstral-123B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MarsupialAI/Monstral-123B") model = AutoModelForCausalLM.from_pretrained("MarsupialAI/Monstral-123B", device_map="auto") 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 MarsupialAI/Monstral-123B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MarsupialAI/Monstral-123B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MarsupialAI/Monstral-123B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MarsupialAI/Monstral-123B
- SGLang
How to use MarsupialAI/Monstral-123B 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 "MarsupialAI/Monstral-123B" \ --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": "MarsupialAI/Monstral-123B", "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 "MarsupialAI/Monstral-123B" \ --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": "MarsupialAI/Monstral-123B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MarsupialAI/Monstral-123B with Docker Model Runner:
docker model run hf.co/MarsupialAI/Monstral-123B
Best model regarding personality but Major flaw
This is the best model by far when it comes to personality and character IQ.
Issue is that (tested 2q) it suffers from low memory IQ.
Seems like 8-11K is the sweet spot, it has really good backlog attention, follows the scenario very well etc. But after that it breaks totally apart, repeats actions, forgets its goal and becomes basically a character with dementia sadly.
Behemoth can go far past 32K so...
It's probably because you're using a Q2 quant
As per our discord conversation, your problem is likely a combination of using a Q2 quant and 4bit KV. I've had no issues out to 32k, which is as far as I can go on my system with iQ3m and 16bit KV.