Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use kzhou35/coldstart with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kzhou35/coldstart with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kzhou35/coldstart") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kzhou35/coldstart") model = AutoModelForCausalLM.from_pretrained("kzhou35/coldstart", 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 kzhou35/coldstart with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kzhou35/coldstart" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kzhou35/coldstart", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kzhou35/coldstart
- SGLang
How to use kzhou35/coldstart 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 "kzhou35/coldstart" \ --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": "kzhou35/coldstart", "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 "kzhou35/coldstart" \ --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": "kzhou35/coldstart", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kzhou35/coldstart with Docker Model Runner:
docker model run hf.co/kzhou35/coldstart
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.8622754491017965, | |
| "eval_steps": 500, | |
| "global_step": 20, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.2874251497005988, | |
| "grad_norm": 10.670862197875977, | |
| "learning_rate": 4.72751631047092e-05, | |
| "loss": 1.0435, | |
| "num_input_tokens_seen": 670576, | |
| "step": 3 | |
| }, | |
| { | |
| "epoch": 0.5748502994011976, | |
| "grad_norm": 1.6404894590377808, | |
| "learning_rate": 3.969463130731183e-05, | |
| "loss": 0.6701, | |
| "num_input_tokens_seen": 1356912, | |
| "step": 6 | |
| }, | |
| { | |
| "epoch": 0.8622754491017964, | |
| "grad_norm": 1.251344919204712, | |
| "learning_rate": 2.8910861626005776e-05, | |
| "loss": 0.4917, | |
| "num_input_tokens_seen": 2040576, | |
| "step": 9 | |
| }, | |
| { | |
| "epoch": 1.095808383233533, | |
| "grad_norm": 1.4765971899032593, | |
| "learning_rate": 1.7274575140626318e-05, | |
| "loss": 0.4176, | |
| "num_input_tokens_seen": 2590528, | |
| "step": 12 | |
| }, | |
| { | |
| "epoch": 1.3832335329341316, | |
| "grad_norm": 0.6158081293106079, | |
| "learning_rate": 7.3223304703363135e-06, | |
| "loss": 0.3634, | |
| "num_input_tokens_seen": 3275616, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 1.6706586826347305, | |
| "grad_norm": 0.5957555174827576, | |
| "learning_rate": 1.2235870926211619e-06, | |
| "loss": 0.3434, | |
| "num_input_tokens_seen": 3959408, | |
| "step": 18 | |
| }, | |
| { | |
| "epoch": 1.8622754491017965, | |
| "num_input_tokens_seen": 4416112, | |
| "step": 20, | |
| "total_flos": 6389928689664.0, | |
| "train_loss": 0.5334016799926757, | |
| "train_runtime": 2199.0599, | |
| "train_samples_per_second": 3.638, | |
| "train_steps_per_second": 0.009 | |
| } | |
| ], | |
| "logging_steps": 3, | |
| "max_steps": 20, | |
| "num_input_tokens_seen": 4416112, | |
| "num_train_epochs": 2, | |
| "save_steps": 30, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 6389928689664.0, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |