Instructions to use DarkArtsForge/Asmodeus-24B-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DarkArtsForge/Asmodeus-24B-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DarkArtsForge/Asmodeus-24B-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DarkArtsForge/Asmodeus-24B-v2") model = AutoModelForCausalLM.from_pretrained("DarkArtsForge/Asmodeus-24B-v2") 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 DarkArtsForge/Asmodeus-24B-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DarkArtsForge/Asmodeus-24B-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DarkArtsForge/Asmodeus-24B-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DarkArtsForge/Asmodeus-24B-v2
- SGLang
How to use DarkArtsForge/Asmodeus-24B-v2 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 "DarkArtsForge/Asmodeus-24B-v2" \ --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": "DarkArtsForge/Asmodeus-24B-v2", "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 "DarkArtsForge/Asmodeus-24B-v2" \ --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": "DarkArtsForge/Asmodeus-24B-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DarkArtsForge/Asmodeus-24B-v2 with Docker Model Runner:
docker model run hf.co/DarkArtsForge/Asmodeus-24B-v2
Error with MLX
Hi, just FYI.
I converted Asmodeus v2 to MLX format using mlx-my-repo. But when when I try to load the model, I receive the following error:
Error when loading model: TypeError: transformers.tokenization_utils_tokenizers.TokenizersBackend._patch_mistral_regex() got multiple values for keyword argument 'fix_mistral_regex'
So I tried converting it locally on my Mac with a newer version of mlx-lm. The conversion fails with the same error.
I'm not sure, on Windows it ignored this error when quantizing to GGUF. Maybe @McG-221 can help since he has somehow converted this to mlx.
Hi, I also used mlx-my-repo. This space is notorious for its little quirks, maybe they were working on it at the time you tried?
mly-my-repo did the conversion for me, but the model won't load, so I deleted the repo.
@McG-221 I tried loading your McG-221/Asmodeus-24B-v2-mlx-8Bit but I get the same error, in LMStudio and mlx_lm as well.
Did you load and use it successfully yet?
@ailexleon I now also did a 4-bit MLX using mlx-my-repo, you can find it here McG-221/Asmodeus-24B-v2-mlx-4Bit βοΈ
Sorry, didn't have time to download it yet... maybe tonight (my time). Will let you know!
@ailexleon @Naphula The solution: in the file tokenizer_config.json you have to delete the whole line with fix_mistral_regex in it, so key and value have to go. After that, it works.
Edit: I updated the file in my 8-bit quant. Just use it, if you want...
Great, thanks!
I changed the line from false to true and the error disappeared on my end. This should have no effect whether you set to true or delete the line, as the regex fix is only applied to 12B Nemo models that use chatML.