Text Generation
Transformers
Safetensors
English
qwen3
agent
code
QASM
quantum
conversational
text-generation-inference
Instructions to use Benyucong/rl_quantum_4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Benyucong/rl_quantum_4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Benyucong/rl_quantum_4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Benyucong/rl_quantum_4b") model = AutoModelForCausalLM.from_pretrained("Benyucong/rl_quantum_4b", device_map="auto") 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 Benyucong/rl_quantum_4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Benyucong/rl_quantum_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": "Benyucong/rl_quantum_4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Benyucong/rl_quantum_4b
- SGLang
How to use Benyucong/rl_quantum_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 "Benyucong/rl_quantum_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": "Benyucong/rl_quantum_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 "Benyucong/rl_quantum_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": "Benyucong/rl_quantum_4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Benyucong/rl_quantum_4b with Docker Model Runner:
docker model run hf.co/Benyucong/rl_quantum_4b
update
Browse files- config.json +1 -1
- generation_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
- model.safetensors.index.json +1 -0
config.json
CHANGED
|
@@ -61,7 +61,7 @@
|
|
| 61 |
"sliding_window": null,
|
| 62 |
"tie_word_embeddings": true,
|
| 63 |
"torch_dtype": "bfloat16",
|
| 64 |
-
"transformers_version": "4.
|
| 65 |
"use_cache": true,
|
| 66 |
"use_sliding_window": false,
|
| 67 |
"vocab_size": 151936
|
|
|
|
| 61 |
"sliding_window": null,
|
| 62 |
"tie_word_embeddings": true,
|
| 63 |
"torch_dtype": "bfloat16",
|
| 64 |
+
"transformers_version": "4.55.0",
|
| 65 |
"use_cache": true,
|
| 66 |
"use_sliding_window": false,
|
| 67 |
"vocab_size": 151936
|
generation_config.json
CHANGED
|
@@ -9,5 +9,5 @@
|
|
| 9 |
"temperature": 0.7,
|
| 10 |
"top_k": 20,
|
| 11 |
"top_p": 0.8,
|
| 12 |
-
"transformers_version": "4.
|
| 13 |
}
|
|
|
|
| 9 |
"temperature": 0.7,
|
| 10 |
"top_k": 20,
|
| 11 |
"top_p": 0.8,
|
| 12 |
+
"transformers_version": "4.55.0"
|
| 13 |
}
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4990095032
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef0fca1ee78f9bfc76d1e4eb766a21a96d85dffe07f205e0223227e8c2f51df8
|
| 3 |
size 4990095032
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4944309096
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e421dc279717625cc3b360dfed4609342357bdbb058188abc684c2f682c8e9e
|
| 3 |
size 4944309096
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4996758848
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:efb3ce3b4a6a3dd219f9878c74773ef3f5b96237b2246834f507fdf8fdc6e376
|
| 3 |
size 4996758848
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2714579640
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2bbc385d1c13346759d3dca1082a45ff44df448bd94a6205f0b2588d6ea70227
|
| 3 |
size 2714579640
|
model.safetensors.index.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
|
|
|
| 3 |
"total_size": 17645697024
|
| 4 |
},
|
| 5 |
"weight_map": {
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_parameters": 4411424256,
|
| 4 |
"total_size": 17645697024
|
| 5 |
},
|
| 6 |
"weight_map": {
|