Text Generation
Transformers
Safetensors
qwen3
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep") model = AutoModelForCausalLM.from_pretrained("FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep") 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 FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep
- SGLang
How to use FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep 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 "FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep" \ --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": "FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep", "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 "FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep" \ --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": "FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep with Docker Model Runner:
docker model run hf.co/FlyPig23/Qwen3-4B_Paper_Impact_code_SFT_1ep
| {"current_steps": 5, "total_steps": 58, "loss": 0.4234, "lr": 1.3333333333333333e-05, "epoch": 0.08620689655172414, "percentage": 8.62, "elapsed_time": "0:01:44", "remaining_time": "0:18:26"} | |
| {"current_steps": 10, "total_steps": 58, "loss": 0.0817, "lr": 1.983619906947144e-05, "epoch": 0.1724137931034483, "percentage": 17.24, "elapsed_time": "0:03:38", "remaining_time": "0:17:30"} | |
| {"current_steps": 15, "total_steps": 58, "loss": 0.0811, "lr": 1.8854560256532098e-05, "epoch": 0.25862068965517243, "percentage": 25.86, "elapsed_time": "0:05:24", "remaining_time": "0:15:31"} | |
| {"current_steps": 20, "total_steps": 58, "loss": 0.0808, "lr": 1.7071067811865477e-05, "epoch": 0.3448275862068966, "percentage": 34.48, "elapsed_time": "0:07:07", "remaining_time": "0:13:32"} | |
| {"current_steps": 25, "total_steps": 58, "loss": 0.078, "lr": 1.4647231720437687e-05, "epoch": 0.43103448275862066, "percentage": 43.1, "elapsed_time": "0:08:58", "remaining_time": "0:11:50"} | |
| {"current_steps": 30, "total_steps": 58, "loss": 0.0781, "lr": 1.180255037813906e-05, "epoch": 0.5172413793103449, "percentage": 51.72, "elapsed_time": "0:10:48", "remaining_time": "0:10:05"} | |
| {"current_steps": 35, "total_steps": 58, "loss": 0.0779, "lr": 8.79463319744677e-06, "epoch": 0.603448275862069, "percentage": 60.34, "elapsed_time": "0:12:45", "remaining_time": "0:08:22"} | |
| {"current_steps": 40, "total_steps": 58, "loss": 0.0772, "lr": 5.895871945472434e-06, "epoch": 0.6896551724137931, "percentage": 68.97, "elapsed_time": "0:14:27", "remaining_time": "0:06:30"} | |
| {"current_steps": 45, "total_steps": 58, "loss": 0.0776, "lr": 3.3687734175920505e-06, "epoch": 0.7758620689655172, "percentage": 77.59, "elapsed_time": "0:16:07", "remaining_time": "0:04:39"} | |
| {"current_steps": 50, "total_steps": 58, "loss": 0.0779, "lr": 1.4421872769855262e-06, "epoch": 0.8620689655172413, "percentage": 86.21, "elapsed_time": "0:17:52", "remaining_time": "0:02:51"} | |
| {"current_steps": 55, "total_steps": 58, "loss": 0.0776, "lr": 2.905818257394799e-07, "epoch": 0.9482758620689655, "percentage": 94.83, "elapsed_time": "0:19:36", "remaining_time": "0:01:04"} | |
| {"current_steps": 58, "total_steps": 58, "epoch": 1.0, "percentage": 100.0, "elapsed_time": "0:21:12", "remaining_time": "0:00:00"} | |