Instructions to use HiTruong/Sailor_chatbot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HiTruong/Sailor_chatbot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HiTruong/Sailor_chatbot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HiTruong/Sailor_chatbot") model = AutoModelForCausalLM.from_pretrained("HiTruong/Sailor_chatbot") 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 HiTruong/Sailor_chatbot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HiTruong/Sailor_chatbot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HiTruong/Sailor_chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HiTruong/Sailor_chatbot
- SGLang
How to use HiTruong/Sailor_chatbot 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 "HiTruong/Sailor_chatbot" \ --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": "HiTruong/Sailor_chatbot", "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 "HiTruong/Sailor_chatbot" \ --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": "HiTruong/Sailor_chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HiTruong/Sailor_chatbot with Docker Model Runner:
docker model run hf.co/HiTruong/Sailor_chatbot
Training in progress, step 4, checkpoint
Browse files
last-checkpoint/adapter_config.json
CHANGED
|
@@ -24,12 +24,12 @@
|
|
| 24 |
"revision": "unsloth",
|
| 25 |
"target_modules": [
|
| 26 |
"o_proj",
|
|
|
|
| 27 |
"k_proj",
|
|
|
|
| 28 |
"gate_proj",
|
| 29 |
-
"up_proj",
|
| 30 |
"v_proj",
|
| 31 |
-
"
|
| 32 |
-
"down_proj"
|
| 33 |
],
|
| 34 |
"task_type": "CAUSAL_LM",
|
| 35 |
"use_dora": false,
|
|
|
|
| 24 |
"revision": "unsloth",
|
| 25 |
"target_modules": [
|
| 26 |
"o_proj",
|
| 27 |
+
"q_proj",
|
| 28 |
"k_proj",
|
| 29 |
+
"down_proj",
|
| 30 |
"gate_proj",
|
|
|
|
| 31 |
"v_proj",
|
| 32 |
+
"up_proj"
|
|
|
|
| 33 |
],
|
| 34 |
"task_type": "CAUSAL_LM",
|
| 35 |
"use_dora": false,
|
last-checkpoint/adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2969089584
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da1c040e73627d172bada7ede0d50219b1359e1826e0317544486ae4922aad81
|
| 3 |
size 2969089584
|
last-checkpoint/optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1487821148
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d36ac8dc3950d91c6a4a8d4f4ea456167c4431dcee6d7510d483b3e8169a9d7f
|
| 3 |
size 1487821148
|
last-checkpoint/trainer_state.json
CHANGED
|
@@ -8,10 +8,10 @@
|
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
| 10 |
"log_history": [],
|
| 11 |
-
"logging_steps":
|
| 12 |
-
"max_steps":
|
| 13 |
"num_input_tokens_seen": 0,
|
| 14 |
-
"num_train_epochs":
|
| 15 |
"save_steps": 4,
|
| 16 |
"stateful_callbacks": {
|
| 17 |
"TrainerControl": {
|
|
|
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
| 10 |
"log_history": [],
|
| 11 |
+
"logging_steps": 51,
|
| 12 |
+
"max_steps": 510,
|
| 13 |
"num_input_tokens_seen": 0,
|
| 14 |
+
"num_train_epochs": 30,
|
| 15 |
"save_steps": 4,
|
| 16 |
"stateful_callbacks": {
|
| 17 |
"TrainerControl": {
|
last-checkpoint/training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5112
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51ec2f7c32ed68f93a2d58b9d808c7d6e793972fdc0fe162bed80ce09ef2fc3c
|
| 3 |
size 5112
|