Instructions to use intervitens/mini-magnum-12b-v1.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use intervitens/mini-magnum-12b-v1.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="intervitens/mini-magnum-12b-v1.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("intervitens/mini-magnum-12b-v1.1") model = AutoModelForCausalLM.from_pretrained("intervitens/mini-magnum-12b-v1.1") 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 intervitens/mini-magnum-12b-v1.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "intervitens/mini-magnum-12b-v1.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "intervitens/mini-magnum-12b-v1.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/intervitens/mini-magnum-12b-v1.1
- SGLang
How to use intervitens/mini-magnum-12b-v1.1 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 "intervitens/mini-magnum-12b-v1.1" \ --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": "intervitens/mini-magnum-12b-v1.1", "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 "intervitens/mini-magnum-12b-v1.1" \ --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": "intervitens/mini-magnum-12b-v1.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use intervitens/mini-magnum-12b-v1.1 with Docker Model Runner:
docker model run hf.co/intervitens/mini-magnum-12b-v1.1
π₯ New version is available! anthracite-org/magnum-12b-v2 π₯
This model is the miniature version of alpindale/magnum-72b-v1, a second entry in a series of models designed to replicate the prose quality of the Claude 3 models, specifically Sonnet and Opus. This model is fine-tuned on top of Mistral-Nemo-Base-2407. A new general purpose instruction dataset by kalomaze was added to the training mix for better coherence and general alignment. We are working on improving our dataset and training procedures, so expect new versions to come out soon.
Prompting
Model has been Instruct tuned with the Mistral formatting. A typical input would look like this:
"""[INST] Hi there! [/INST]Nice to meet you!</s>[INST] Can I ask a question? [/INST]
"""
Credits
This model has been a team effort, credits go to:
- Sao10K and kalomaze for help with (and cleaning up!) the dataset.
- alpindale for the training.
- Various other people for their continued help as we tuned the parameters, restarted failed runs. In no particular order: Doctor Shotgun, Lucy, Nopm, Mango, Intervitens, and the rest of the Silly Tilly.
Safety
...
- Downloads last month
- 27
