Instructions to use ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Thinking-2507") model = PeftModel.from_pretrained(base_model, "ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter") - Transformers
How to use ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter
- SGLang
How to use ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter 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 "ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter" \ --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": "ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter", "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 "ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter" \ --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": "ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter with Docker Model Runner:
docker model run hf.co/ForSureTesterSim/Qwen3-4B-Thinking-KnowRL-Adapter
Initial upload of KnowRL Production Adapter
Browse files- README.md +1 -0
- adapter_config.json +8 -6
- adapter_model.safetensors +1 -1
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -206,4 +206,5 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 206 |
[More Information Needed]
|
| 207 |
### Framework versions
|
| 208 |
|
|
|
|
| 209 |
- PEFT 0.19.1
|
|
|
|
| 206 |
[More Information Needed]
|
| 207 |
### Framework versions
|
| 208 |
|
| 209 |
+
- PEFT 0.20.0
|
| 210 |
- PEFT 0.19.1
|
adapter_config.json
CHANGED
|
@@ -23,20 +23,21 @@
|
|
| 23 |
"megatron_config": null,
|
| 24 |
"megatron_core": "megatron.core",
|
| 25 |
"modules_to_save": null,
|
|
|
|
| 26 |
"peft_type": "LORA",
|
| 27 |
-
"peft_version": "0.
|
| 28 |
"qalora_group_size": 16,
|
| 29 |
"r": 16,
|
| 30 |
"rank_pattern": {},
|
| 31 |
"revision": null,
|
| 32 |
"target_modules": [
|
| 33 |
-
"down_proj",
|
| 34 |
-
"gate_proj",
|
| 35 |
-
"up_proj",
|
| 36 |
"v_proj",
|
| 37 |
"k_proj",
|
| 38 |
"o_proj",
|
| 39 |
-
"q_proj"
|
|
|
|
|
|
|
|
|
|
| 40 |
],
|
| 41 |
"target_parameters": null,
|
| 42 |
"task_type": "CAUSAL_LM",
|
|
@@ -44,5 +45,6 @@
|
|
| 44 |
"use_bdlora": null,
|
| 45 |
"use_dora": false,
|
| 46 |
"use_qalora": false,
|
| 47 |
-
"use_rslora": false
|
|
|
|
| 48 |
}
|
|
|
|
| 23 |
"megatron_config": null,
|
| 24 |
"megatron_core": "megatron.core",
|
| 25 |
"modules_to_save": null,
|
| 26 |
+
"monteclora_config": null,
|
| 27 |
"peft_type": "LORA",
|
| 28 |
+
"peft_version": "0.20.0",
|
| 29 |
"qalora_group_size": 16,
|
| 30 |
"r": 16,
|
| 31 |
"rank_pattern": {},
|
| 32 |
"revision": null,
|
| 33 |
"target_modules": [
|
|
|
|
|
|
|
|
|
|
| 34 |
"v_proj",
|
| 35 |
"k_proj",
|
| 36 |
"o_proj",
|
| 37 |
+
"q_proj",
|
| 38 |
+
"up_proj",
|
| 39 |
+
"down_proj",
|
| 40 |
+
"gate_proj"
|
| 41 |
],
|
| 42 |
"target_parameters": null,
|
| 43 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 45 |
"use_bdlora": null,
|
| 46 |
"use_dora": false,
|
| 47 |
"use_qalora": false,
|
| 48 |
+
"use_rslora": false,
|
| 49 |
+
"velora_config": null
|
| 50 |
}
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 132187888
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:356292d9eeafbb81aa27220478d0dc45b1ae84e7ab42372b383c2ad411ef15bc
|
| 3 |
size 132187888
|
training_args.bin
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:9a53e3bd1d67ba25f9a4562ec305944d05418f3b298befd67d6359d2c72c81ee
|
| 3 |
+
size 7633
|