Instructions to use 2p8xx/Foundation-Sec-8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 2p8xx/Foundation-Sec-8B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="2p8xx/Foundation-Sec-8B-Instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("2p8xx/Foundation-Sec-8B-Instruct") model = AutoModelForCausalLM.from_pretrained("2p8xx/Foundation-Sec-8B-Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 2p8xx/Foundation-Sec-8B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "2p8xx/Foundation-Sec-8B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "2p8xx/Foundation-Sec-8B-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/2p8xx/Foundation-Sec-8B-Instruct
- SGLang
How to use 2p8xx/Foundation-Sec-8B-Instruct 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 "2p8xx/Foundation-Sec-8B-Instruct" \ --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": "2p8xx/Foundation-Sec-8B-Instruct", "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 "2p8xx/Foundation-Sec-8B-Instruct" \ --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": "2p8xx/Foundation-Sec-8B-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 2p8xx/Foundation-Sec-8B-Instruct with Docker Model Runner:
docker model run hf.co/2p8xx/Foundation-Sec-8B-Instruct
Trained with Unsloth
Browse files- README.md +3 -0
- config.json +1 -1
- 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
README.md
CHANGED
|
@@ -9,6 +9,9 @@ pipeline_tag: text-generation
|
|
| 9 |
library_name: transformers
|
| 10 |
tags:
|
| 11 |
- security
|
|
|
|
|
|
|
|
|
|
| 12 |
datasets:
|
| 13 |
- yahma/alpaca-cleaned
|
| 14 |
---
|
|
|
|
| 9 |
library_name: transformers
|
| 10 |
tags:
|
| 11 |
- security
|
| 12 |
+
- unsloth
|
| 13 |
+
- trl
|
| 14 |
+
- sft
|
| 15 |
datasets:
|
| 16 |
- yahma/alpaca-cleaned
|
| 17 |
---
|
config.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
| 31 |
"tie_word_embeddings": false,
|
| 32 |
"torch_dtype": "bfloat16",
|
| 33 |
"transformers_version": "4.51.3",
|
| 34 |
-
"unsloth_version": "2025.
|
| 35 |
"use_cache": true,
|
| 36 |
"vocab_size": 128384
|
| 37 |
}
|
|
|
|
| 31 |
"tie_word_embeddings": false,
|
| 32 |
"torch_dtype": "bfloat16",
|
| 33 |
"transformers_version": "4.51.3",
|
| 34 |
+
"unsloth_version": "2025.5.5",
|
| 35 |
"use_cache": true,
|
| 36 |
"vocab_size": 128384
|
| 37 |
}
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4977747248
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89f38a6415b4a85ecc4b841c0f009326c4b42ce6118a8e5d415b3c3f4b230bc0
|
| 3 |
size 4977747248
|
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:2ec0bd466dd7e70a3ec56d136947640021158cc2be3dfab8d277a4e69222b692
|
| 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:09ba081c11142a9c33cc861d6bfde511cb683e600ca6d0106b29758818304a59
|
| 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 1169187384
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b559cec325b70adc389b8d34a91c381c5e257bc2ece78102be08086d94ff5def
|
| 3 |
size 1169187384
|