Text Generation
Transformers
Safetensors
phi3
axolotl
Generated from Trainer
conversational
text-generation-inference
Instructions to use SystemAdmin123/tiny-random-Phi3ForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SystemAdmin123/tiny-random-Phi3ForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SystemAdmin123/tiny-random-Phi3ForCausalLM") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SystemAdmin123/tiny-random-Phi3ForCausalLM") model = AutoModelForCausalLM.from_pretrained("SystemAdmin123/tiny-random-Phi3ForCausalLM") 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
- vLLM
How to use SystemAdmin123/tiny-random-Phi3ForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SystemAdmin123/tiny-random-Phi3ForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SystemAdmin123/tiny-random-Phi3ForCausalLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SystemAdmin123/tiny-random-Phi3ForCausalLM
- SGLang
How to use SystemAdmin123/tiny-random-Phi3ForCausalLM 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 "SystemAdmin123/tiny-random-Phi3ForCausalLM" \ --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": "SystemAdmin123/tiny-random-Phi3ForCausalLM", "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 "SystemAdmin123/tiny-random-Phi3ForCausalLM" \ --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": "SystemAdmin123/tiny-random-Phi3ForCausalLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SystemAdmin123/tiny-random-Phi3ForCausalLM with Docker Model Runner:
docker model run hf.co/SystemAdmin123/tiny-random-Phi3ForCausalLM
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 16.666666666666668, | |
| "eval_steps": 20, | |
| "global_step": 100, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.16666666666666666, | |
| "eval_loss": 10.377338409423828, | |
| "eval_runtime": 2.3538, | |
| "eval_samples_per_second": 637.683, | |
| "eval_steps_per_second": 5.098, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 1.6666666666666665, | |
| "grad_norm": 0.208984375, | |
| "learning_rate": 0.00019863613034027224, | |
| "loss": 10.3698, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 3.3333333333333335, | |
| "grad_norm": 0.4296875, | |
| "learning_rate": 0.0001879473751206489, | |
| "loss": 10.3199, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 3.3333333333333335, | |
| "eval_loss": 10.274003028869629, | |
| "eval_runtime": 2.365, | |
| "eval_samples_per_second": 634.681, | |
| "eval_steps_per_second": 5.074, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "grad_norm": 0.45703125, | |
| "learning_rate": 0.00016772815716257412, | |
| "loss": 10.2229, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 6.666666666666667, | |
| "grad_norm": 0.458984375, | |
| "learning_rate": 0.00014016954246529696, | |
| "loss": 10.1217, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 6.666666666666667, | |
| "eval_loss": 10.078692436218262, | |
| "eval_runtime": 2.3372, | |
| "eval_samples_per_second": 642.213, | |
| "eval_steps_per_second": 5.134, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 8.333333333333334, | |
| "grad_norm": 0.4609375, | |
| "learning_rate": 0.00010825793454723325, | |
| "loss": 10.0382, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 10.0, | |
| "grad_norm": 0.4609375, | |
| "learning_rate": 7.54514512859201e-05, | |
| "loss": 9.9768, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 10.0, | |
| "eval_loss": 9.960792541503906, | |
| "eval_runtime": 2.3223, | |
| "eval_samples_per_second": 646.34, | |
| "eval_steps_per_second": 5.167, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 11.666666666666666, | |
| "grad_norm": 0.4609375, | |
| "learning_rate": 4.530518418775733e-05, | |
| "loss": 9.9373, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 13.333333333333334, | |
| "grad_norm": 0.462890625, | |
| "learning_rate": 2.1085949060360654e-05, | |
| "loss": 9.9182, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 13.333333333333334, | |
| "eval_loss": 9.922646522521973, | |
| "eval_runtime": 2.3435, | |
| "eval_samples_per_second": 640.486, | |
| "eval_steps_per_second": 5.12, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 15.0, | |
| "grad_norm": 0.46484375, | |
| "learning_rate": 5.418275829936537e-06, | |
| "loss": 9.9122, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 16.666666666666668, | |
| "grad_norm": 0.462890625, | |
| "learning_rate": 0.0, | |
| "loss": 9.9115, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 16.666666666666668, | |
| "eval_loss": 9.921339988708496, | |
| "eval_runtime": 2.3434, | |
| "eval_samples_per_second": 640.535, | |
| "eval_steps_per_second": 5.121, | |
| "step": 100 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 100, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 17, | |
| "save_steps": 20, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 164363029708800.0, | |
| "train_batch_size": 32, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |