Instructions to use balawmt/LanguageModel_Trial_1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use balawmt/LanguageModel_Trial_1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="balawmt/LanguageModel_Trial_1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("balawmt/LanguageModel_Trial_1") model = AutoModelForCausalLM.from_pretrained("balawmt/LanguageModel_Trial_1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use balawmt/LanguageModel_Trial_1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "balawmt/LanguageModel_Trial_1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "balawmt/LanguageModel_Trial_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/balawmt/LanguageModel_Trial_1
- SGLang
How to use balawmt/LanguageModel_Trial_1 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 "balawmt/LanguageModel_Trial_1" \ --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": "balawmt/LanguageModel_Trial_1", "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 "balawmt/LanguageModel_Trial_1" \ --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": "balawmt/LanguageModel_Trial_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use balawmt/LanguageModel_Trial_1 with Docker Model Runner:
docker model run hf.co/balawmt/LanguageModel_Trial_1
File size: 1,947 Bytes
787edde | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | {
"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
}
|