Instructions to use balamariannmt/LanguageModel_Trial_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use balamariannmt/LanguageModel_Trial_2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="balamariannmt/LanguageModel_Trial_2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("balamariannmt/LanguageModel_Trial_2") model = AutoModelForCausalLM.from_pretrained("balamariannmt/LanguageModel_Trial_2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use balamariannmt/LanguageModel_Trial_2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "balamariannmt/LanguageModel_Trial_2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "balamariannmt/LanguageModel_Trial_2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/balamariannmt/LanguageModel_Trial_2
- SGLang
How to use balamariannmt/LanguageModel_Trial_2 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 "balamariannmt/LanguageModel_Trial_2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "balamariannmt/LanguageModel_Trial_2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "balamariannmt/LanguageModel_Trial_2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "balamariannmt/LanguageModel_Trial_2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use balamariannmt/LanguageModel_Trial_2 with Docker Model Runner:
docker model run hf.co/balamariannmt/LanguageModel_Trial_2
LanguageModel_Trial_2 / Checkpoints_1_6_M /gpt2-python-language-model /checkpoint-5130 /trainer_state.json
| { | |
| "best_metric": 1.9876124858856201, | |
| "best_model_checkpoint": "Checkpoints_1_6_M/gpt2-python-language-model/checkpoint-5130", | |
| "epoch": 2.0, | |
| "global_step": 5130, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.19, | |
| "learning_rate": 5e-05, | |
| "loss": 2.1955, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.39, | |
| "learning_rate": 4.4600431965442765e-05, | |
| "loss": 1.8704, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 0.58, | |
| "learning_rate": 3.920086393088553e-05, | |
| "loss": 1.7624, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 0.78, | |
| "learning_rate": 3.38012958963283e-05, | |
| "loss": 1.7039, | |
| "step": 2000 | |
| }, | |
| { | |
| "epoch": 0.97, | |
| "learning_rate": 2.840172786177106e-05, | |
| "loss": 1.6626, | |
| "step": 2500 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 2.0070595741271973, | |
| "eval_runtime": 102.1824, | |
| "eval_samples_per_second": 386.446, | |
| "step": 2565 | |
| }, | |
| { | |
| "epoch": 1.17, | |
| "learning_rate": 2.3002159827213822e-05, | |
| "loss": 1.6134, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 1.36, | |
| "learning_rate": 1.7602591792656588e-05, | |
| "loss": 1.5933, | |
| "step": 3500 | |
| }, | |
| { | |
| "epoch": 1.56, | |
| "learning_rate": 1.2203023758099353e-05, | |
| "loss": 1.5742, | |
| "step": 4000 | |
| }, | |
| { | |
| "epoch": 1.75, | |
| "learning_rate": 6.803455723542117e-06, | |
| "loss": 1.5735, | |
| "step": 4500 | |
| }, | |
| { | |
| "epoch": 1.95, | |
| "learning_rate": 1.4038876889848812e-06, | |
| "loss": 1.5623, | |
| "step": 5000 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 1.9876124858856201, | |
| "eval_runtime": 102.2828, | |
| "eval_samples_per_second": 386.067, | |
| "step": 5130 | |
| } | |
| ], | |
| "max_steps": 5130, | |
| "num_train_epochs": 2, | |
| "total_flos": 31377467721646080, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |