Text Generation
Transformers
Safetensors
English
mistral
mergekit
Merge
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use Nohobby/MS-Schisandra-22B-v0.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nohobby/MS-Schisandra-22B-v0.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nohobby/MS-Schisandra-22B-v0.2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Nohobby/MS-Schisandra-22B-v0.2") model = AutoModelForMultimodalLM.from_pretrained("Nohobby/MS-Schisandra-22B-v0.2") 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 Nohobby/MS-Schisandra-22B-v0.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nohobby/MS-Schisandra-22B-v0.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nohobby/MS-Schisandra-22B-v0.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Nohobby/MS-Schisandra-22B-v0.2
- SGLang
How to use Nohobby/MS-Schisandra-22B-v0.2 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 "Nohobby/MS-Schisandra-22B-v0.2" \ --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": "Nohobby/MS-Schisandra-22B-v0.2", "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 "Nohobby/MS-Schisandra-22B-v0.2" \ --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": "Nohobby/MS-Schisandra-22B-v0.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Nohobby/MS-Schisandra-22B-v0.2 with Docker Model Runner:
docker model run hf.co/Nohobby/MS-Schisandra-22B-v0.2
Upload ST-formatting-Schisandra.json
Browse files- ST-formatting-Schisandra.json +137 -0
ST-formatting-Schisandra.json
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"instruct": {
|
| 3 |
+
"input_sequence": "\n[INST] ",
|
| 4 |
+
"output_sequence": "",
|
| 5 |
+
"last_output_sequence": "",
|
| 6 |
+
"system_sequence": "\n[INST] Narrative Instructions: ",
|
| 7 |
+
"stop_sequence": "",
|
| 8 |
+
"wrap": false,
|
| 9 |
+
"macro": true,
|
| 10 |
+
"activation_regex": "",
|
| 11 |
+
"system_sequence_prefix": "",
|
| 12 |
+
"system_sequence_suffix": "",
|
| 13 |
+
"first_output_sequence": "",
|
| 14 |
+
"skip_examples": true,
|
| 15 |
+
"output_suffix": "</s>",
|
| 16 |
+
"input_suffix": "[/INST]",
|
| 17 |
+
"system_suffix": "[/INST]",
|
| 18 |
+
"user_alignment_message": "",
|
| 19 |
+
"system_same_as_user": false,
|
| 20 |
+
"last_system_sequence": "",
|
| 21 |
+
"first_input_sequence": "",
|
| 22 |
+
"last_input_sequence": "",
|
| 23 |
+
"names_behavior": "always",
|
| 24 |
+
"names_force_groups": true,
|
| 25 |
+
"name": "MS-Instruct"
|
| 26 |
+
},
|
| 27 |
+
"context": {
|
| 28 |
+
"story_string": "\n<s>[INST] {{#if system}}{{system}}\n\n{{/if}}{{#if wiBefore}}## World Info:\n{{wiBefore}}\n{{/if}}{{#if description}}## {{char}}'s Description:\n{{description}}\n{{/if}}{{#if personality}}## {{char}}'s Personality:\n{{personality}}\n{{/if}}{{#if persona}}## {{user}}'s Persona:\n{{persona}}\n{{/if}}{{#if scenario}}## Scenario:\n{{scenario}}\n{{/if}}{{#if wiAfter}}## World Info:\n{{wiAfter}}\n{{/if}}{{#if mesExamples}}## {{char}}'s Example Response:\n{{mesExamples}}\n{{/if}}\n[/INST]",
|
| 29 |
+
"example_separator": "",
|
| 30 |
+
"chat_start": "## Exchange:",
|
| 31 |
+
"use_stop_strings": false,
|
| 32 |
+
"allow_jailbreak": false,
|
| 33 |
+
"names_as_stop_strings": false,
|
| 34 |
+
"always_force_name2": false,
|
| 35 |
+
"trim_sentences": true,
|
| 36 |
+
"single_line": false,
|
| 37 |
+
"name": "MS-Context"
|
| 38 |
+
},
|
| 39 |
+
"preset": {
|
| 40 |
+
"temp": 0.9,
|
| 41 |
+
"temperature_last": true,
|
| 42 |
+
"top_p": 0.88,
|
| 43 |
+
"top_k": 100,
|
| 44 |
+
"top_a": 0,
|
| 45 |
+
"tfs": 1,
|
| 46 |
+
"epsilon_cutoff": 0,
|
| 47 |
+
"eta_cutoff": 0,
|
| 48 |
+
"typical_p": 1,
|
| 49 |
+
"min_p": 0.003,
|
| 50 |
+
"rep_pen": 1.04,
|
| 51 |
+
"rep_pen_range": 0,
|
| 52 |
+
"rep_pen_decay": 0,
|
| 53 |
+
"rep_pen_slope": 0.7,
|
| 54 |
+
"no_repeat_ngram_size": 0,
|
| 55 |
+
"penalty_alpha": 0,
|
| 56 |
+
"num_beams": 1,
|
| 57 |
+
"length_penalty": 1,
|
| 58 |
+
"min_length": 0,
|
| 59 |
+
"encoder_rep_pen": 1,
|
| 60 |
+
"freq_pen": 0,
|
| 61 |
+
"presence_pen": 0.03,
|
| 62 |
+
"skew": 0,
|
| 63 |
+
"do_sample": true,
|
| 64 |
+
"early_stopping": true,
|
| 65 |
+
"dynatemp": false,
|
| 66 |
+
"min_temp": 0,
|
| 67 |
+
"max_temp": 2,
|
| 68 |
+
"dynatemp_exponent": 1,
|
| 69 |
+
"smoothing_factor": 0,
|
| 70 |
+
"smoothing_curve": 1,
|
| 71 |
+
"dry_allowed_length": 2,
|
| 72 |
+
"dry_multiplier": 0.8,
|
| 73 |
+
"dry_base": 1.75,
|
| 74 |
+
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
|
| 75 |
+
"dry_penalty_last_n": 28672,
|
| 76 |
+
"add_bos_token": true,
|
| 77 |
+
"ban_eos_token": false,
|
| 78 |
+
"skip_special_tokens": true,
|
| 79 |
+
"mirostat_mode": 0,
|
| 80 |
+
"mirostat_tau": 5,
|
| 81 |
+
"mirostat_eta": 0.1,
|
| 82 |
+
"guidance_scale": 1,
|
| 83 |
+
"negative_prompt": "",
|
| 84 |
+
"grammar_string": "",
|
| 85 |
+
"json_schema": {},
|
| 86 |
+
"banned_tokens": "",
|
| 87 |
+
"sampler_priority": [
|
| 88 |
+
"repetition_penalty",
|
| 89 |
+
"presence_penalty",
|
| 90 |
+
"frequency_penalty",
|
| 91 |
+
"dry",
|
| 92 |
+
"temperature",
|
| 93 |
+
"dynamic_temperature",
|
| 94 |
+
"quadratic_sampling",
|
| 95 |
+
"top_k",
|
| 96 |
+
"top_p",
|
| 97 |
+
"typical_p",
|
| 98 |
+
"epsilon_cutoff",
|
| 99 |
+
"eta_cutoff",
|
| 100 |
+
"tfs",
|
| 101 |
+
"top_a",
|
| 102 |
+
"min_p",
|
| 103 |
+
"mirostat",
|
| 104 |
+
"xtc",
|
| 105 |
+
"encoder_repetition_penalty",
|
| 106 |
+
"no_repeat_ngram"
|
| 107 |
+
],
|
| 108 |
+
"samplers": [
|
| 109 |
+
"top_k",
|
| 110 |
+
"tfs_z",
|
| 111 |
+
"typical_p",
|
| 112 |
+
"top_p",
|
| 113 |
+
"min_p",
|
| 114 |
+
"xtc",
|
| 115 |
+
"temperature"
|
| 116 |
+
],
|
| 117 |
+
"ignore_eos_token": false,
|
| 118 |
+
"spaces_between_special_tokens": true,
|
| 119 |
+
"speculative_ngram": false,
|
| 120 |
+
"sampler_order": [
|
| 121 |
+
6,
|
| 122 |
+
0,
|
| 123 |
+
1,
|
| 124 |
+
3,
|
| 125 |
+
4,
|
| 126 |
+
2,
|
| 127 |
+
5
|
| 128 |
+
],
|
| 129 |
+
"logit_bias": [],
|
| 130 |
+
"xtc_threshold": 0.1,
|
| 131 |
+
"xtc_probability": 0.23,
|
| 132 |
+
"rep_pen_size": 0,
|
| 133 |
+
"genamt": 350,
|
| 134 |
+
"max_length": 28672,
|
| 135 |
+
"name": "vKW"
|
| 136 |
+
}
|
| 137 |
+
}
|