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
Commit ·
c8fa24a
1
Parent(s): 588ecd6
Upload templates
Browse files
ST Templates/context/LimaRPv3 Alpaca (No Length).json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"story_string": "### Instruction:\n{{#if wiBefore}}{{wiBefore}}\n\n{{/if}}{{#if description}}{{description}}\n\n{{/if}}{{#if persona}}{{user}}'s Persona: {{persona}}\n\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n\n{{/if}}{{#if system}}{{system}}{{/if}}",
|
| 3 |
+
"example_separator": "",
|
| 4 |
+
"chat_start": "",
|
| 5 |
+
"use_stop_strings": false,
|
| 6 |
+
"always_force_name2": true,
|
| 7 |
+
"trim_sentences": false,
|
| 8 |
+
"include_newline": false,
|
| 9 |
+
"single_line": false,
|
| 10 |
+
"name": "LimaRPv3 Alpaca (No Length)"
|
| 11 |
+
}
|
ST Templates/context/LimaRPv3 Alpaca.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"story_string": "### Instruction:\n{{#if wiBefore}}{{wiBefore}}\n\n{{/if}}{{#if description}}{{description}}\n\n{{/if}}{{#if persona}}{{user}}'s Persona: {{persona}}\n\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n\n{{/if}}{{#if system}}{{system}}{{/if}}",
|
| 3 |
+
"example_separator": "",
|
| 4 |
+
"chat_start": "",
|
| 5 |
+
"always_force_name2": true,
|
| 6 |
+
"trim_sentences": false,
|
| 7 |
+
"include_newline": false,
|
| 8 |
+
"single_line": false,
|
| 9 |
+
"name": "LimaRPv3 Alpaca"
|
| 10 |
+
}
|
ST Templates/instruct/LimaRPv3 Alpaca (No Length).json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"system_prompt": "Play the role of {{char}}. 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}}.",
|
| 3 |
+
"input_sequence": "\n### Input:",
|
| 4 |
+
"output_sequence": "\n### Response:",
|
| 5 |
+
"first_output_sequence": "",
|
| 6 |
+
"last_output_sequence": "\n### Response:",
|
| 7 |
+
"system_sequence_prefix": "",
|
| 8 |
+
"system_sequence_suffix": "",
|
| 9 |
+
"stop_sequence": "",
|
| 10 |
+
"separator_sequence": "",
|
| 11 |
+
"wrap": true,
|
| 12 |
+
"macro": true,
|
| 13 |
+
"names": true,
|
| 14 |
+
"names_force_groups": true,
|
| 15 |
+
"activation_regex": "",
|
| 16 |
+
"name": "LimaRPv3 Alpaca (No Length)"
|
| 17 |
+
}
|
ST Templates/instruct/LimaRPv3 Alpaca.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"system_prompt": "Play the role of {{char}}. 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}}.",
|
| 3 |
+
"input_sequence": "\n### Input:",
|
| 4 |
+
"output_sequence": "\n### Response:",
|
| 5 |
+
"first_output_sequence": "",
|
| 6 |
+
"last_output_sequence": "\n### Response: (length = medium)",
|
| 7 |
+
"system_sequence_prefix": "",
|
| 8 |
+
"system_sequence_suffix": "",
|
| 9 |
+
"stop_sequence": "",
|
| 10 |
+
"separator_sequence": "",
|
| 11 |
+
"wrap": true,
|
| 12 |
+
"macro": true,
|
| 13 |
+
"names": true,
|
| 14 |
+
"names_force_groups": true,
|
| 15 |
+
"activation_regex": "",
|
| 16 |
+
"name": "LimaRPv3 Alpaca"
|
| 17 |
+
}
|