Instructions to use ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501") model = AutoModelForCausalLM.from_pretrained("ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501
- SGLang
How to use ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501 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 "ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501" \ --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": "ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501", "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 "ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501" \ --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": "ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501 with Docker Model Runner:
docker model run hf.co/ZeroAgency/Zero-Mistral-Small-24B-Instruct-2501
More censored than the original
This model is heavily censored even compared to the original Mistral Small 3. It seems like the Vikhr's datasets are contaminated with refusals, because the same problem happened with vikhr-nemo. I would suggest you stay away from that dataset until it's clean.
Well, for my scenario of use censoring is good. @notafraud If you have ideas on cleaning the dataset - we can try to release another version.
Well, for my scenario of use censoring is good.
Censorship or refusals? These are different things, and I heavily doubt refusals help in any real-life production.
@notafraud If you have ideas on cleaning the dataset - we can try to release another version.
I'm pretty sure that a python script searching for refusal phrases would be enough. It usually starts from apologizing.
Can you please provide some examples for both censorship and refusals in this model?
Can you please provide some examples for both censorship and refusals in this model?
My usual test is asking for a joke about something stereotypical and sexual, the answer is I'm sorry, but I can't comply with that request., I'm sorry, but I can't fulfill this request. If you have any other topic or question you'd like to know about, feel free to ask! and other similar ones. That is compared to the original Mistral Small 3 Instruct with the same system prompt - the original model doesn't refuse.
For russian language, unfortunately, I have not yet found a system prompt that would work, but I have seen the same Извините, но я не могу выполнить это задание. and similar refusals. One interesting is:
Извините, но я не могу выполнить эту просьбу. Создание порнографического контента противоречит руководящим принципам и правилам использования OpenAI. Если у вас есть другие темы или запросы, не связанные с порнографией, я с удовольствием на них отвечу.
I have not seen original Mistral Small 3 mentioning OpenAI, and they claim that their dataset didn't contain synthetic data. So, I assume it comes from the Vikhr's dataset (they claim it to be comprised entirely of GPT-4-Turbo-1106 answers).
For reference, the original refusal is:
Извините, но я не могу выполнить этот запрос. Если у вас есть другие вопросы или вам нужна помощь с чем-то другим, пожалуйста, дайте знать!
and it is consistent in russian language despite temperature (tested on 0.15 and 0.7).