Text Generation
Transformers
Safetensors
English
qwen3
cot
code
gpt_oss
conversational
distillation
math
text-generation-inference
Instructions to use Pinkstack/DistilGPT-OSS-qwen3-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Pinkstack/DistilGPT-OSS-qwen3-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Pinkstack/DistilGPT-OSS-qwen3-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Pinkstack/DistilGPT-OSS-qwen3-4B") model = AutoModelForCausalLM.from_pretrained("Pinkstack/DistilGPT-OSS-qwen3-4B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Pinkstack/DistilGPT-OSS-qwen3-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Pinkstack/DistilGPT-OSS-qwen3-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pinkstack/DistilGPT-OSS-qwen3-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Pinkstack/DistilGPT-OSS-qwen3-4B
- SGLang
How to use Pinkstack/DistilGPT-OSS-qwen3-4B 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 "Pinkstack/DistilGPT-OSS-qwen3-4B" \ --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": "Pinkstack/DistilGPT-OSS-qwen3-4B", "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 "Pinkstack/DistilGPT-OSS-qwen3-4B" \ --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": "Pinkstack/DistilGPT-OSS-qwen3-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Pinkstack/DistilGPT-OSS-qwen3-4B with Docker Model Runner:
docker model run hf.co/Pinkstack/DistilGPT-OSS-qwen3-4B
Update README.md
Browse files
README.md
CHANGED
|
@@ -21,6 +21,34 @@ DistilGPT-OSS-qwen3-4B is a Qwen3 4B-2507 thinking fine tune, it supports up to
|
|
| 21 |
|
| 22 |
Keep in mind, this is a community project and we are NOT related to qwen by Alibaba nor GPT-OSS by OpenAi.
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
# Format
|
| 25 |
This is the chat format of this model (you can also check the Jinja template file in "Files and versions"):
|
| 26 |
```
|
|
@@ -59,4 +87,4 @@ Keep in mind, these tests were done in LM Studio, GGUF q8_0 on a single consumer
|
|
| 59 |
|
| 60 |
# Additional information
|
| 61 |
|
| 62 |
-
The model was trained using unsloth, using a mix of private datasets and public datasets.
|
|
|
|
| 21 |
|
| 22 |
Keep in mind, this is a community project and we are NOT related to qwen by Alibaba nor GPT-OSS by OpenAi.
|
| 23 |
|
| 24 |
+
# Use cases & benefits
|
| 25 |
+
|
| 26 |
+
Benefits of using this model over standard qwen3 4b thinking:
|
| 27 |
+
|
| 28 |
+
- You decide how much it would think (low, medium, high)
|
| 29 |
+
- completely different style of answers (more similar to ChatGPT)
|
| 30 |
+
- Produces less emoji (qwen3 4b uses quite a lot in its responses which some may not like)
|
| 31 |
+
- Less censored/limiting than qwen3 4b
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
DistilGPT-OSS-qwen3-4B should be used for the following:
|
| 35 |
+
|
| 36 |
+
- Local on device efficient assistance
|
| 37 |
+
- Code generation
|
| 38 |
+
- Summary generation
|
| 39 |
+
- General use
|
| 40 |
+
|
| 41 |
+
Or anything else
|
| 42 |
+
|
| 43 |
+
❌⚠️ It should ABSOLUTELY **not** be used for:
|
| 44 |
+
|
| 45 |
+
- High-risk workspaces
|
| 46 |
+
- Medical questions
|
| 47 |
+
- Anything high risk which requires 1:1 accuracy.
|
| 48 |
+
|
| 49 |
+
It is a small model thus general knowledge is limited to its size.
|
| 50 |
+
|
| 51 |
+
|
| 52 |
# Format
|
| 53 |
This is the chat format of this model (you can also check the Jinja template file in "Files and versions"):
|
| 54 |
```
|
|
|
|
| 87 |
|
| 88 |
# Additional information
|
| 89 |
|
| 90 |
+
The model was trained using unsloth, using a mix of private datasets and public datasets.
|