Instructions to use tistak/sn6_0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tistak/sn6_0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tistak/sn6_0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tistak/sn6_0") model = AutoModelForCausalLM.from_pretrained("tistak/sn6_0") 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 tistak/sn6_0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tistak/sn6_0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tistak/sn6_0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tistak/sn6_0
- SGLang
How to use tistak/sn6_0 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 "tistak/sn6_0" \ --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": "tistak/sn6_0", "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 "tistak/sn6_0" \ --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": "tistak/sn6_0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tistak/sn6_0 with Docker Model Runner:
docker model run hf.co/tistak/sn6_0
Upload LlamaForCausalLM
Browse files- config.json +2 -2
- generation_config.json +1 -2
- model-00001-of-00004.safetensors +1 -1
- model-00002-of-00004.safetensors +1 -1
- model-00003-of-00004.safetensors +1 -1
- model-00004-of-00004.safetensors +1 -1
config.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 100257,
|
| 9 |
-
"eos_token_id":
|
| 10 |
"hidden_act": "silu",
|
| 11 |
"hidden_size": 4096,
|
| 12 |
"initializer_range": 0.02,
|
|
@@ -23,6 +23,6 @@
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.40.0",
|
| 26 |
-
"use_cache":
|
| 27 |
"vocab_size": 128256
|
| 28 |
}
|
|
|
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 100257,
|
| 9 |
+
"eos_token_id": 128001,
|
| 10 |
"hidden_act": "silu",
|
| 11 |
"hidden_size": 4096,
|
| 12 |
"initializer_range": 0.02,
|
|
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.40.0",
|
| 26 |
+
"use_cache": true,
|
| 27 |
"vocab_size": 128256
|
| 28 |
}
|
generation_config.json
CHANGED
|
@@ -2,6 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 128000,
|
| 4 |
"eos_token_id": 128001,
|
| 5 |
-
"transformers_version": "4.40.0"
|
| 6 |
-
"use_cache": false
|
| 7 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 128000,
|
| 4 |
"eos_token_id": 128001,
|
| 5 |
+
"transformers_version": "4.40.0"
|
|
|
|
| 6 |
}
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4976698672
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4f87a89d6227d9f2b301c441e488ffae2fc9817632f4a1d702e61df3a16b395
|
| 3 |
size 4976698672
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999802720
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dcb2fb7e7b8fc32cea1fdd6a471fc49f7b9f61f175154b136a383c39bbfdfa60
|
| 3 |
size 4999802720
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4915916176
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cfaffa520e1f5ab75f522a9ef8f60313476596c363b1047f1f3b1712df6ad5cc
|
| 3 |
size 4915916176
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1168138808
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:434109b081b59071d3040e18e89f6191ce4b82f80201713a0bcc1e45b4e477b6
|
| 3 |
size 1168138808
|