Instructions to use saber135/ada_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use saber135/ada_model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/functiongemma-270m-it") model = PeftModel.from_pretrained(base_model, "saber135/ada_model") - Transformers
How to use saber135/ada_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="saber135/ada_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("saber135/ada_model", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use saber135/ada_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saber135/ada_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saber135/ada_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/saber135/ada_model
- SGLang
How to use saber135/ada_model 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 "saber135/ada_model" \ --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": "saber135/ada_model", "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 "saber135/ada_model" \ --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": "saber135/ada_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use saber135/ada_model with Docker Model Runner:
docker model run hf.co/saber135/ada_model
File size: 1,913 Bytes
abc825b | 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 | {
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 3.0,
"eval_steps": 500,
"global_step": 21,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"entropy": 0.5876428335905075,
"epoch": 0.8,
"grad_norm": 26.097728729248047,
"learning_rate": 0.0001,
"loss": 6.2434,
"mean_token_accuracy": 0.48119242638349535,
"num_tokens": 15116.0,
"step": 5
},
{
"entropy": 1.4853135066873886,
"epoch": 1.48,
"grad_norm": 5.605739593505859,
"learning_rate": 9.371733080722911e-05,
"loss": 2.4627,
"mean_token_accuracy": 0.6227525683010325,
"num_tokens": 27973.0,
"step": 10
},
{
"entropy": 1.726570823613335,
"epoch": 2.16,
"grad_norm": 3.4330334663391113,
"learning_rate": 7.644820051634812e-05,
"loss": 1.4966,
"mean_token_accuracy": 0.7552376985549927,
"num_tokens": 40761.0,
"step": 15
},
{
"entropy": 1.1423663020133972,
"epoch": 2.96,
"grad_norm": 2.336728811264038,
"learning_rate": 5.2532458441935636e-05,
"loss": 0.9415,
"mean_token_accuracy": 0.8482233583927155,
"num_tokens": 55844.0,
"step": 20
}
],
"logging_steps": 5,
"max_steps": 35,
"num_input_tokens_seen": 0,
"num_train_epochs": 5,
"save_steps": 500,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": false
},
"attributes": {}
}
},
"total_flos": 35657548827648.0,
"train_batch_size": 4,
"trial_name": null,
"trial_params": null
}
|