Instructions to use cationic/tinyaya-base-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cationic/tinyaya-base-sft with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("CohereForAI/aya-expanse-8b") model = PeftModel.from_pretrained(base_model, "cationic/tinyaya-base-sft") - Transformers
How to use cationic/tinyaya-base-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cationic/tinyaya-base-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("cationic/tinyaya-base-sft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cationic/tinyaya-base-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cationic/tinyaya-base-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cationic/tinyaya-base-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cationic/tinyaya-base-sft
- SGLang
How to use cationic/tinyaya-base-sft 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 "cationic/tinyaya-base-sft" \ --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": "cationic/tinyaya-base-sft", "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 "cationic/tinyaya-base-sft" \ --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": "cationic/tinyaya-base-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cationic/tinyaya-base-sft with Docker Model Runner:
docker model run hf.co/cationic/tinyaya-base-sft
Download checkpoint-54/trainer_state.json from cationic/tinyaya-base-sft: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/cationic/tinyaya-base-sft/resolve/main/checkpoint-54/trainer_state.json
- Command line
-
hf download hf://cationic/tinyaya-base-sft/checkpoint-54/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/cationic/tinyaya-base-sft/resolve/main/checkpoint-54/trainer_state.json
2.26 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.0, | |
| "eval_steps": 500, | |
| "global_step": 54, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 2.244855484366417, | |
| "epoch": 0.5633802816901409, | |
| "grad_norm": 0.1324576884508133, | |
| "learning_rate": 0.00019118998459920902, | |
| "loss": 2.239246368408203, | |
| "mean_token_accuracy": 0.4848026029765606, | |
| "num_tokens": 18782.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 2.1752436344440165, | |
| "epoch": 1.1126760563380282, | |
| "grad_norm": 0.10374104976654053, | |
| "learning_rate": 0.00015173378141776568, | |
| "loss": 1.9484254837036132, | |
| "mean_token_accuracy": 0.5156795466557528, | |
| "num_tokens": 37306.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 2.0852559447288512, | |
| "epoch": 1.676056338028169, | |
| "grad_norm": 0.10845215618610382, | |
| "learning_rate": 9.396215025777139e-05, | |
| "loss": 1.8074285507202148, | |
| "mean_token_accuracy": 0.5365702405571937, | |
| "num_tokens": 56164.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 1.9582344171328423, | |
| "epoch": 2.2253521126760565, | |
| "grad_norm": 0.11132995039224625, | |
| "learning_rate": 3.832811273714569e-05, | |
| "loss": 1.7026189804077148, | |
| "mean_token_accuracy": 0.5575806765984266, | |
| "num_tokens": 74352.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 1.9350761294364929, | |
| "epoch": 2.788732394366197, | |
| "grad_norm": 0.11781041324138641, | |
| "learning_rate": 4.527913349145441e-06, | |
| "loss": 1.59641695022583, | |
| "mean_token_accuracy": 0.5745055139064789, | |
| "num_tokens": 93088.0, | |
| "step": 50 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 54, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 6348749937868800.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |