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
- 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
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 58, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.08620689655172414, | |
| "grad_norm": 2.4018161296844482, | |
| "learning_rate": 1.3333333333333333e-05, | |
| "loss": 0.4234, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.1724137931034483, | |
| "grad_norm": 1.6455100774765015, | |
| "learning_rate": 1.983619906947144e-05, | |
| "loss": 0.0817, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.25862068965517243, | |
| "grad_norm": 0.3768883943557739, | |
| "learning_rate": 1.8854560256532098e-05, | |
| "loss": 0.0811, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.3448275862068966, | |
| "grad_norm": 0.7822470664978027, | |
| "learning_rate": 1.7071067811865477e-05, | |
| "loss": 0.0808, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.43103448275862066, | |
| "grad_norm": 0.18719947338104248, | |
| "learning_rate": 1.4647231720437687e-05, | |
| "loss": 0.078, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.5172413793103449, | |
| "grad_norm": 0.009137788787484169, | |
| "learning_rate": 1.180255037813906e-05, | |
| "loss": 0.0781, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.603448275862069, | |
| "grad_norm": 0.19379863142967224, | |
| "learning_rate": 8.79463319744677e-06, | |
| "loss": 0.0779, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 0.6896551724137931, | |
| "grad_norm": 0.265879362821579, | |
| "learning_rate": 5.895871945472434e-06, | |
| "loss": 0.0772, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.7758620689655172, | |
| "grad_norm": 0.38630935549736023, | |
| "learning_rate": 3.3687734175920505e-06, | |
| "loss": 0.0776, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.8620689655172413, | |
| "grad_norm": 0.533342182636261, | |
| "learning_rate": 1.4421872769855262e-06, | |
| "loss": 0.0779, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.9482758620689655, | |
| "grad_norm": 0.6314339637756348, | |
| "learning_rate": 2.905818257394799e-07, | |
| "loss": 0.0776, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 58, | |
| "total_flos": 2.1110553137958093e+17, | |
| "train_loss": 0.10852315148402905, | |
| "train_runtime": 1273.7115, | |
| "train_samples_per_second": 2.893, | |
| "train_steps_per_second": 0.046 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 58, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.1110553137958093e+17, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |