Instructions to use joshuaclymer/saint-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use joshuaclymer/saint-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="joshuaclymer/saint-2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("joshuaclymer/saint-2") model = AutoModelForCausalLM.from_pretrained("joshuaclymer/saint-2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use joshuaclymer/saint-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "joshuaclymer/saint-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joshuaclymer/saint-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/joshuaclymer/saint-2
- SGLang
How to use joshuaclymer/saint-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 "joshuaclymer/saint-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joshuaclymer/saint-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "joshuaclymer/saint-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joshuaclymer/saint-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use joshuaclymer/saint-2 with Docker Model Runner:
docker model run hf.co/joshuaclymer/saint-2
Upload folder using huggingface_hub
Browse files
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
@@ -22,8 +22,8 @@
|
|
| 22 |
"rope_scaling": null,
|
| 23 |
"rope_theta": 10000.0,
|
| 24 |
"tie_word_embeddings": false,
|
| 25 |
-
"torch_dtype": "
|
| 26 |
-
"transformers_version": "4.
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 32000
|
| 29 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "../together/saint-2",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 22 |
"rope_scaling": null,
|
| 23 |
"rope_theta": 10000.0,
|
| 24 |
"tie_word_embeddings": false,
|
| 25 |
+
"torch_dtype": "bfloat16",
|
| 26 |
+
"transformers_version": "4.35.0",
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 32000
|
| 29 |
}
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
-
"transformers_version": "4.
|
| 7 |
}
|
|
|
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.35.0"
|
| 7 |
}
|
model-00001-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:008800ddcf23a333f520eb9c972f2f9baaf8581a1997944619d62ebb3c990ce6
|
| 3 |
+
size 4978265800
|
model-00002-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19459e871346d5361c08a66ceab259bae553d9e292109c521db0fd46d308ad25
|
| 3 |
+
size 4970422232
|
model-00003-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3628a2d8e31e8afa888e1affc9cda33f4ec09a9f004fcf3c427276b4d0dadb62
|
| 3 |
+
size 4970422256
|
model-00004-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56195a7c9601927f45fd8f1010394a7d1ea3670597cd6181c6d8d6db455758f1
|
| 3 |
+
size 4933701504
|
model-00005-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce9adeda217352f16f23e9b511809b33b251cce0091010e5377ca32bf73b4f1a
|
| 3 |
+
size 4933722216
|
model-00006-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49d523ef52a4a9f17fcd698f67ec9a3fc278ee6ffe81b0464ace828fbfca740c
|
| 3 |
+
size 1245236920
|