Instructions to use DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss") model = AutoModelForCausalLM.from_pretrained("DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss") 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 DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss
- SGLang
How to use DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss 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 "DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss" \ --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": "DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss", "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 "DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss" \ --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": "DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss with Docker Model Runner:
docker model run hf.co/DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss
Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss
Experimental model, using a limarp qlora trained at 10k ctx length (greater than size of the longest limarp sample when tokenized via mistral's tokenizer) on mistralai/Mixtral-8x7B-v0.1 using Charles Goddard's ZLoss and Megablocks-based fork of transformers, and then fused to mistralai/Mixtral-8x7B-Instruct-v0.1 at 0.5 weight.
My current generation settings are:
Temperature: 1.25
Min-p: 0.05
Repetition penalty: 1.05
Repetition penalty: range 1024
And this seems to avoid the Mixtral looping pitfalls for me so far. Play around with it and see what works well for you.
Quants courtesy of TheBloke:
Exl2 Quants courtesy of LoneStriker:
Usage:
The intended prompt format is the Alpaca instruction format of LimaRP v3:
### Instruction:
Character's Persona: {bot character description}
User's Persona: {user character description}
Scenario: {what happens in the story}
Play the role of Character. Taking the above information into consideration, you must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User.
### Input:
User: {utterance}
### Response:
Character: {utterance}
### Input:
User: {utterance}
### Response:
Character: {utterance}
(etc.)
My current templates have been uploaded to a folder.
Message length control
Due to the inclusion of LimaRP v3, it is possible to append a length modifier to the response instruction sequence, like this:
### Input
User: {utterance}
### Response: (length = medium)
Character: {utterance}
This has an immediately noticeable effect on bot responses. The available lengths are: micro, tiny, short, medium, long, massive, huge, enormous, humongous, unlimited. The recommended starting length is medium. Keep in mind that the AI may ramble or impersonate the user with very long messages.
Bias, Risks, and Limitations
The model will show biases similar to those observed in niche roleplaying forums on the Internet, besides those exhibited by the base model. It is not intended for supplying factual information or advice in any form.
Training Details
This model is a merge. Please refer to the link repositories of the merged models for details.
- Downloads last month
- 4
docker model run hf.co/DS-Archive/Mixtral-8x7B-Instruct-v0.1-LimaRP-ZLoss