Instructions to use FastFlowLM/GPT-OSS-20B-NPU2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FastFlowLM/GPT-OSS-20B-NPU2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FastFlowLM/GPT-OSS-20B-NPU2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FastFlowLM/GPT-OSS-20B-NPU2") model = AutoModelForCausalLM.from_pretrained("FastFlowLM/GPT-OSS-20B-NPU2") 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
- vLLM
How to use FastFlowLM/GPT-OSS-20B-NPU2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FastFlowLM/GPT-OSS-20B-NPU2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FastFlowLM/GPT-OSS-20B-NPU2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FastFlowLM/GPT-OSS-20B-NPU2
- SGLang
How to use FastFlowLM/GPT-OSS-20B-NPU2 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 "FastFlowLM/GPT-OSS-20B-NPU2" \ --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": "FastFlowLM/GPT-OSS-20B-NPU2", "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 "FastFlowLM/GPT-OSS-20B-NPU2" \ --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": "FastFlowLM/GPT-OSS-20B-NPU2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FastFlowLM/GPT-OSS-20B-NPU2 with Docker Model Runner:
docker model run hf.co/FastFlowLM/GPT-OSS-20B-NPU2
new_xclbin_v0.9.13
#1
by FastFlowLM - opened
- .gitattributes +0 -1
- config.json +1 -1
- dequant_mxfp4.xclbin +2 -2
- dequant_q4_1.xclbin +2 -2
- layer.xclbin +2 -2
- mm.xclbin +2 -2
.gitattributes
CHANGED
|
@@ -41,4 +41,3 @@ attn.xclbin filter=lfs diff=lfs merge=lfs -text
|
|
| 41 |
dequant_mxfp4.xclbin filter=lfs diff=lfs merge=lfs -text
|
| 42 |
expert.xclbin filter=lfs diff=lfs merge=lfs -text
|
| 43 |
mm.xclbin filter=lfs diff=lfs merge=lfs -text
|
| 44 |
-
*.q4nx filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 41 |
dequant_mxfp4.xclbin filter=lfs diff=lfs merge=lfs -text
|
| 42 |
expert.xclbin filter=lfs diff=lfs merge=lfs -text
|
| 43 |
mm.xclbin filter=lfs diff=lfs merge=lfs -text
|
|
|
config.json
CHANGED
|
@@ -78,5 +78,5 @@
|
|
| 78 |
"addr_l_begin_mha": 20480,
|
| 79 |
"addr_l_end_mha": 35328,
|
| 80 |
"addr_kk": 35328,
|
| 81 |
-
"flm_version": "0.9.
|
| 82 |
}
|
|
|
|
| 78 |
"addr_l_begin_mha": 20480,
|
| 79 |
"addr_l_end_mha": 35328,
|
| 80 |
"addr_kk": 35328,
|
| 81 |
+
"flm_version": "0.9.12"
|
| 82 |
}
|
dequant_mxfp4.xclbin
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:b52787eaf72fa34f5d540ee40c706ccc9a6c3f43a47190dea66cd5beadb84d8c
|
| 3 |
+
size 280555
|
dequant_q4_1.xclbin
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:18e24350c519521976c4a1fdb4f342a437ba9a4abedb716dca99adc5bb6e9a2a
|
| 3 |
+
size 114667
|
layer.xclbin
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:828334475daecd108913fc83571b262c5420fb1882125aec0b2fa239cf6267ce
|
| 3 |
+
size 445627
|
mm.xclbin
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:4d001fcc3e8b5aa553f740abedc859ded13173747c6eeb670763959322c8a936
|
| 3 |
+
size 451611
|