Instructions to use DS-Archive/Mixtral-8x7B-Instruct-v0.1-limarp 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 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") 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") model = AutoModelForCausalLM.from_pretrained("DS-Archive/Mixtral-8x7B-Instruct-v0.1-limarp") 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 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" # 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", "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
- SGLang
How to use DS-Archive/Mixtral-8x7B-Instruct-v0.1-limarp 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" \ --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", "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" \ --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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DS-Archive/Mixtral-8x7B-Instruct-v0.1-limarp with Docker Model Runner:
docker model run hf.co/DS-Archive/Mixtral-8x7B-Instruct-v0.1-limarp
Mixtral-8x7B-Instruct-v0.1-limarp
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 and then fused to mistralai/Mixtral-8x7B-Instruct-v0.1 at 0.5 weight.
Note that all modules were trained, including 'gate'. There are some reports that perhaps training the 'gate' module isn't fully functional at the moment. In cursory testing this appears to obey the limarp alpaca prompt format correctly.
Not extensively tested for quality, YMMV. Would try with temp ~1.5-2 and min-p of ~0.03-0.05 since mixtral does appear to be highly confident on its responses.
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.)
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
- 13