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)# pip install -U transformers accelerate # 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=256) 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
Commit History
-
Update README.md
Verified signatureb958127
-
Add paper and code links to model card (#1)
Verified signature- Add paper and code links to model card (a63b53063fdd1fb79c49da0dc59eb0eec4f9165d) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>4758135
-
Update README.md
Verified signature36040a5 -
Update README.md
Verified signature2f2b703 -
Update README.md
Verified signature10490c0 -
Update README.md
Verified signatureaf03636 -
Update README.md
Verified signature7f065c7
-
Update README.md
Verified signature0d1de20 -
Update README.md
Verified signature1498ea6 -
Update README.md
Verified signature3be63c2 -
Update README.md
Verified signature3ee8f99 -
Update README.md
Verified signature3753cce -
Update README.md
Verified signaturef110443 -
Update README.md
Verified signature4b6ac2c -
Create README.md
Verified signature07b4322 -
Upload model-00004-of-00004.safetensors with huggingface_hub
Verified signatureb0c91a8 -
Upload model-00003-of-00004.safetensors with huggingface_hub
Verified signaturebab17bd -
Upload model-00002-of-00004.safetensors with huggingface_hub
Verified signature0b83f19 -
Upload model-00001-of-00004.safetensors with huggingface_hub
Verified signature01fd020
-
update
Verified signature35c0eb1
-
update
Verified signaturea7acad6 -
update
Verified signaturedad40eb -
initial commit
Verified signature2ed24f5