Instructions to use maywell/Mini_Synatra_SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use maywell/Mini_Synatra_SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="maywell/Mini_Synatra_SFT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("maywell/Mini_Synatra_SFT") model = AutoModelForCausalLM.from_pretrained("maywell/Mini_Synatra_SFT", 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 maywell/Mini_Synatra_SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maywell/Mini_Synatra_SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maywell/Mini_Synatra_SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/maywell/Mini_Synatra_SFT
- SGLang
How to use maywell/Mini_Synatra_SFT 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 "maywell/Mini_Synatra_SFT" \ --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": "maywell/Mini_Synatra_SFT", "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 "maywell/Mini_Synatra_SFT" \ --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": "maywell/Mini_Synatra_SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use maywell/Mini_Synatra_SFT with Docker Model Runner:
docker model run hf.co/maywell/Mini_Synatra_SFT
Delete .ipynb_checkpoints
Browse files
.ipynb_checkpoints/added_tokens-checkpoint.json
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"<|im_end|>": 32000,
|
| 3 |
-
"<|im_start|>": 32001
|
| 4 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ipynb_checkpoints/config-checkpoint.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "maywell/Mini_Synatra_SFT",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"MistralForCausalLM"
|
| 5 |
-
],
|
| 6 |
-
"bos_token_id": 1,
|
| 7 |
-
"eos_token_id": 32000,
|
| 8 |
-
"hidden_act": "silu",
|
| 9 |
-
"hidden_size": 4096,
|
| 10 |
-
"initializer_range": 0.02,
|
| 11 |
-
"intermediate_size": 14336,
|
| 12 |
-
"max_position_embeddings": 32768,
|
| 13 |
-
"model_type": "mistral",
|
| 14 |
-
"num_attention_heads": 32,
|
| 15 |
-
"num_hidden_layers": 32,
|
| 16 |
-
"num_key_value_heads": 8,
|
| 17 |
-
"rms_norm_eps": 1e-05,
|
| 18 |
-
"rope_theta": 10000.0,
|
| 19 |
-
"sliding_window": 4096,
|
| 20 |
-
"tie_word_embeddings": false,
|
| 21 |
-
"torch_dtype": "bfloat16",
|
| 22 |
-
"transformers_version": "4.35.1",
|
| 23 |
-
"use_cache": false,
|
| 24 |
-
"vocab_size": 32002
|
| 25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ipynb_checkpoints/generation_config-checkpoint.json
DELETED
|
@@ -1,7 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_from_model_config": true,
|
| 3 |
-
"bos_token_id": 1,
|
| 4 |
-
"eos_token_id": 32000,
|
| 5 |
-
"transformers_version": "4.35.1",
|
| 6 |
-
"use_cache": false
|
| 7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ipynb_checkpoints/special_tokens_map-checkpoint.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"<unk>",
|
| 4 |
-
"<s>",
|
| 5 |
-
"</s>"
|
| 6 |
-
],
|
| 7 |
-
"bos_token": {
|
| 8 |
-
"content": "<s>",
|
| 9 |
-
"lstrip": false,
|
| 10 |
-
"normalized": false,
|
| 11 |
-
"rstrip": false,
|
| 12 |
-
"single_word": false
|
| 13 |
-
},
|
| 14 |
-
"eos_token": {
|
| 15 |
-
"content": "<|im_end|>",
|
| 16 |
-
"lstrip": false,
|
| 17 |
-
"normalized": false,
|
| 18 |
-
"rstrip": false,
|
| 19 |
-
"single_word": false
|
| 20 |
-
},
|
| 21 |
-
"pad_token": {
|
| 22 |
-
"content": "</s>",
|
| 23 |
-
"lstrip": false,
|
| 24 |
-
"normalized": false,
|
| 25 |
-
"rstrip": false,
|
| 26 |
-
"single_word": false
|
| 27 |
-
},
|
| 28 |
-
"unk_token": {
|
| 29 |
-
"content": "<unk>",
|
| 30 |
-
"lstrip": false,
|
| 31 |
-
"normalized": false,
|
| 32 |
-
"rstrip": false,
|
| 33 |
-
"single_word": false
|
| 34 |
-
}
|
| 35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|