Instructions to use sophosympatheia/Midnight-Miqu-70B-v1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sophosympatheia/Midnight-Miqu-70B-v1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sophosympatheia/Midnight-Miqu-70B-v1.5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sophosympatheia/Midnight-Miqu-70B-v1.5") model = AutoModelForCausalLM.from_pretrained("sophosympatheia/Midnight-Miqu-70B-v1.5", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sophosympatheia/Midnight-Miqu-70B-v1.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sophosympatheia/Midnight-Miqu-70B-v1.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sophosympatheia/Midnight-Miqu-70B-v1.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sophosympatheia/Midnight-Miqu-70B-v1.5
- SGLang
How to use sophosympatheia/Midnight-Miqu-70B-v1.5 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 "sophosympatheia/Midnight-Miqu-70B-v1.5" \ --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": "sophosympatheia/Midnight-Miqu-70B-v1.5", "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 "sophosympatheia/Midnight-Miqu-70B-v1.5" \ --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": "sophosympatheia/Midnight-Miqu-70B-v1.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sophosympatheia/Midnight-Miqu-70B-v1.5 with Docker Model Runner:
docker model run hf.co/sophosympatheia/Midnight-Miqu-70B-v1.5
Merged a 103B version
Hi !
I've been using your Midnight Miqu 103B v1.0 and found it really good ! I took the liberty of creating a 103B version of your V1.5 70B model. I used the same merge parameters than your own v1.0 103B model.
https://huggingface.co/FluffyKaeloky/Midnight-Miqu-103B-v1.5
This is the first merge I do, other than quantisations, so hopefully I did not do anything wrong. I've tested it quite a lot with 32K context with no issues. I am currently uploading EXL2 quants as well.
May I ask, also, why 103B ? Since the model has 120 layers ? This gets me a bit confused.
Thanks for your amazing work ! :D
Your merge config looks good for it. You beat me to it! I added your model to my collections for Midnight Miqu so hopefully people see it.
The number of parameters isn't quite equal to the number of layers. For example, a 70B parameter model has 80 layers and a 120B parameter model has 140 layers. 103B just happens to be the approximate number of parameters for 120 layers. I think it's a nice in between point.
Ah, I see ! Thanks for the clarification ! I'm also glad you could add it to your collection !
Fun fact, I had the files on my computer sitting for about three days, complete with exl2 quants, but my internet connection decided to die right when I was done. I'm glad to finally be able to upload all that ! I'll send you a message next time :)