Text Generation
Transformers
Safetensors
qwen3
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use yueqis/web-sample with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yueqis/web-sample with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yueqis/web-sample") 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("yueqis/web-sample") model = AutoModelForCausalLM.from_pretrained("yueqis/web-sample", 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 yueqis/web-sample with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yueqis/web-sample" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yueqis/web-sample", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yueqis/web-sample
- SGLang
How to use yueqis/web-sample 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 "yueqis/web-sample" \ --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": "yueqis/web-sample", "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 "yueqis/web-sample" \ --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": "yueqis/web-sample", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yueqis/web-sample with Docker Model Runner:
docker model run hf.co/yueqis/web-sample
Download trainer_state.json from yueqis/web-sample: direct link, hf CLI and curl.
- Browser
- Download file 5.19 kB
-
https://huggingface.co/yueqis/web-sample/resolve/main/trainer_state.json
- Command line
-
hf download hf://yueqis/web-sample/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/yueqis/web-sample/resolve/main/trainer_state.json
5.19 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9964841788046208, | |
| "eval_steps": 1000, | |
| "global_step": 248, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.04018081366147665, | |
| "grad_norm": 3.9855914370792176, | |
| "learning_rate": 6.923076923076923e-06, | |
| "loss": 1.528, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.0803616273229533, | |
| "grad_norm": 1.1009387233386336, | |
| "learning_rate": 9.983924160137627e-06, | |
| "loss": 0.7997, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.12054244098442994, | |
| "grad_norm": 0.8531122977437774, | |
| "learning_rate": 9.886057021922984e-06, | |
| "loss": 0.6384, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.1607232546459066, | |
| "grad_norm": 0.8536491315382806, | |
| "learning_rate": 9.700998080399287e-06, | |
| "loss": 0.626, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.20090406830738322, | |
| "grad_norm": 0.8012093869333087, | |
| "learning_rate": 9.432049716762151e-06, | |
| "loss": 0.5725, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.24108488196885988, | |
| "grad_norm": 0.7591296330983313, | |
| "learning_rate": 9.08401132093219e-06, | |
| "loss": 0.5478, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.2812656956303365, | |
| "grad_norm": 0.7482379362816577, | |
| "learning_rate": 8.663093646328166e-06, | |
| "loss": 0.547, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.3214465092918132, | |
| "grad_norm": 0.739024551349721, | |
| "learning_rate": 8.17680797882512e-06, | |
| "loss": 0.5588, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.3616273229532898, | |
| "grad_norm": 0.7393951361302983, | |
| "learning_rate": 7.633832097679959e-06, | |
| "loss": 0.508, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.40180813661476644, | |
| "grad_norm": 0.7515531494396616, | |
| "learning_rate": 7.04385542035506e-06, | |
| "loss": 0.5226, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.4419889502762431, | |
| "grad_norm": 0.7192941297373309, | |
| "learning_rate": 6.41740609463409e-06, | |
| "loss": 0.5259, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.48216976393771976, | |
| "grad_norm": 0.7491496835437959, | |
| "learning_rate": 5.765663123575401e-06, | |
| "loss": 0.5236, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.5223505775991963, | |
| "grad_norm": 0.6913958034624077, | |
| "learning_rate": 5.1002568759376134e-06, | |
| "loss": 0.4932, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.562531391260673, | |
| "grad_norm": 0.7500711845802256, | |
| "learning_rate": 4.433061541973591e-06, | |
| "loss": 0.4862, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.6027122049221497, | |
| "grad_norm": 0.6913808839000353, | |
| "learning_rate": 3.77598323822407e-06, | |
| "loss": 0.5015, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.6428930185836264, | |
| "grad_norm": 0.6642782125575131, | |
| "learning_rate": 3.1407475425859348e-06, | |
| "loss": 0.5478, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.683073832245103, | |
| "grad_norm": 0.6488024479264766, | |
| "learning_rate": 2.5386902510968627e-06, | |
| "loss": 0.4814, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.7232546459065796, | |
| "grad_norm": 0.7186636113633829, | |
| "learning_rate": 1.9805550903864775e-06, | |
| "loss": 0.5066, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.7634354595680563, | |
| "grad_norm": 0.6368854640125701, | |
| "learning_rate": 1.4763019956201252e-06, | |
| "loss": 0.4917, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.8036162732295329, | |
| "grad_norm": 0.8130162452154214, | |
| "learning_rate": 1.0349293752198842e-06, | |
| "loss": 0.4796, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.8437970868910095, | |
| "grad_norm": 0.7305985326066481, | |
| "learning_rate": 6.643135340531137e-07, | |
| "loss": 0.5084, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.8839779005524862, | |
| "grad_norm": 0.7027540145976225, | |
| "learning_rate": 3.710681205854838e-07, | |
| "loss": 0.4863, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.9241587142139628, | |
| "grad_norm": 0.6411791844623818, | |
| "learning_rate": 1.6042610616743782e-07, | |
| "loss": 0.4763, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.9643395278754395, | |
| "grad_norm": 0.6768334011228406, | |
| "learning_rate": 3.6146402536468285e-08, | |
| "loss": 0.4711, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.9964841788046208, | |
| "step": 248, | |
| "total_flos": 790927692005376.0, | |
| "train_loss": 0.5734609403917866, | |
| "train_runtime": 14466.4063, | |
| "train_samples_per_second": 2.202, | |
| "train_steps_per_second": 0.017 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 248, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 100, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 790927692005376.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |