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
Upload folder using huggingface_hub
Browse filesFiles changed (18)
- .gitattributes+2
- README.mdAdded+62
- adapter_config.jsonAdded+46
- adapter_model.safetensorsAdded+3
- chat_template.jinjaAdded+1
- checkpoint-54/README.mdAdded+209
- checkpoint-54/adapter_config.jsonAdded+46
- checkpoint-54/adapter_model.safetensorsAdded+3
- checkpoint-54/chat_template.jinjaAdded+1
- checkpoint-54/optimizer.ptAdded+3
- checkpoint-54/rng_state.pthAdded+3
- checkpoint-54/scheduler.ptAdded+3
- checkpoint-54/tokenizer.jsonAdded+3
- checkpoint-54/tokenizer_config.jsonAdded+20
- checkpoint-54/trainer_state.jsonAdded+84
- checkpoint-54/training_args.binAdded+3
- tokenizer.jsonAdded+3
- tokenizer_config.jsonAdded+20
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines333435363732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textcheckpoint-54/tokenizer.json filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162---base_model: CohereForAI/aya-expanse-8blibrary_name: peftmodel_name: base_sfttags:- base_model:adapter:CohereForAI/aya-expanse-8b- lora- sft- transformers- trllicence: licensepipeline_tag: text-generation---
# Model Card for base_sft
This model is a fine-tuned version of [CohereForAI/aya-expanse-8b](https://huggingface.co/CohereForAI/aya-expanse-8b).It has been trained using [TRL](https://github.com/huggingface/trl).
## Quick start
```pythonfrom transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"generator = pipeline("text-generation", model="None", device="cuda")output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]print(output["generated_text"])```
## Training procedure
This model was trained with SFT.
### Framework versions
- PEFT 0.18.1- TRL: 0.29.0- Transformers: 5.3.0- Pytorch: 2.10.0- Datasets: 4.7.0- Tokenizers: 0.22.2
## Citations
Cite TRL as: ```bibtex@software{vonwerra2020trl, title = {{TRL: Transformers Reinforcement Learning}}, author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin}, license = {Apache-2.0}, url = {https://github.com/huggingface/trl}, year = {2020}}```12345678910111213141516171819202122232425262728293031323334353637383940414243444546{ "alora_invocation_tokens": null, "alpha_pattern": {}, "arrow_config": null, "auto_mapping": null, "base_model_name_or_path": "CohereForAI/aya-expanse-8b", "bias": "none", "corda_config": null, "ensure_weight_tying": false, "eva_config": null, "exclude_modules": null, "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layer_replication": null, "layers_pattern": null, "layers_to_transform": null, "loftq_config": {}, "lora_alpha": 32, "lora_bias": false, "lora_dropout": 0.05, "megatron_config": null, "megatron_core": "megatron.core", "modules_to_save": null, "peft_type": "LORA", "peft_version": "0.18.1", "qalora_group_size": 16, "r": 16, "rank_pattern": {}, "revision": null, "target_modules": [ "q_proj", "v_proj", "gate_proj", "o_proj", "down_proj", "k_proj", "up_proj" ], "target_parameters": null, "task_type": "CAUSAL_LM", "trainable_token_indices": null, "use_dora": false, "use_qalora": false, "use_rslora": false}123version https://git-lfs.github.com/spec/v1oid sha256:22b80588cdae266cec107ba60314f0747f5214f13d041ea9d08c3922b58e0055size 1678322401{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% elif false == true %}{% set loop_messages = messages %}{% set system_message = 'You are Aya, a brilliant, sophisticated, multilingual AI-assistant trained to assist human users by providing thorough responses. You are able to interact and respond to questions in 23 languages and you are powered by a multilingual model built by Cohere For AI.' %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% if system_message != false %}{{ '<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>' + system_message + '<|END_OF_TURN_TOKEN|>' }}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|START_OF_TURN_TOKEN|><|USER_TOKEN|>' + content.strip() + '<|END_OF_TURN_TOKEN|>' }}{% elif message['role'] == 'assistant' %}{{ '<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>' + content.strip() + '<|END_OF_TURN_TOKEN|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>' }}{% endif %}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209---base_model: CohereForAI/aya-expanse-8blibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:CohereForAI/aya-expanse-8b- lora- sft- transformers- trl---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [More Information Needed]- **Funded by [optional]:** [More Information Needed]- **Shared by [optional]:** [More Information Needed]- **Model type:** [More Information Needed]- **Language(s) (NLP):** [More Information Needed]- **License:** [More Information Needed]- **Finetuned from model [optional]:** [More Information Needed]
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** [More Information Needed]- **Paper [optional]:** [More Information Needed]- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
[More Information Needed]
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
[More Information Needed]
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Preprocessing [optional]
[More Information Needed]
#### Training Hyperparameters
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[More Information Needed]
### Results
[More Information Needed]
#### Summary
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]- **Hours used:** [More Information Needed]- **Cloud Provider:** [More Information Needed]- **Compute Region:** [More Information Needed]- **Carbon Emitted:** [More Information Needed]
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]
### Compute Infrastructure
[More Information Needed]
#### Hardware
[More Information Needed]
#### Software
[More Information Needed]
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
## More Information [optional]
[More Information Needed]
## Model Card Authors [optional]
[More Information Needed]
## Model Card Contact
[More Information Needed]### Framework versions
- PEFT 0.18.112345678910111213141516171819202122232425262728293031323334353637383940414243444546{ "alora_invocation_tokens": null, "alpha_pattern": {}, "arrow_config": null, "auto_mapping": null, "base_model_name_or_path": "CohereForAI/aya-expanse-8b", "bias": "none", "corda_config": null, "ensure_weight_tying": false, "eva_config": null, "exclude_modules": null, "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layer_replication": null, "layers_pattern": null, "layers_to_transform": null, "loftq_config": {}, "lora_alpha": 32, "lora_bias": false, "lora_dropout": 0.05, "megatron_config": null, "megatron_core": "megatron.core", "modules_to_save": null, "peft_type": "LORA", "peft_version": "0.18.1", "qalora_group_size": 16, "r": 16, "rank_pattern": {}, "revision": null, "target_modules": [ "q_proj", "v_proj", "gate_proj", "o_proj", "down_proj", "k_proj", "up_proj" ], "target_parameters": null, "task_type": "CAUSAL_LM", "trainable_token_indices": null, "use_dora": false, "use_qalora": false, "use_rslora": false}123version https://git-lfs.github.com/spec/v1oid sha256:22b80588cdae266cec107ba60314f0747f5214f13d041ea9d08c3922b58e0055size 1678322401{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% elif false == true %}{% set loop_messages = messages %}{% set system_message = 'You are Aya, a brilliant, sophisticated, multilingual AI-assistant trained to assist human users by providing thorough responses. You are able to interact and respond to questions in 23 languages and you are powered by a multilingual model built by Cohere For AI.' %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% if system_message != false %}{{ '<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>' + system_message + '<|END_OF_TURN_TOKEN|>' }}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|START_OF_TURN_TOKEN|><|USER_TOKEN|>' + content.strip() + '<|END_OF_TURN_TOKEN|>' }}{% elif message['role'] == 'assistant' %}{{ '<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>' + content.strip() + '<|END_OF_TURN_TOKEN|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>' }}{% endif %}123version https://git-lfs.github.com/spec/v1oid sha256:0b687d9269f90b36a7a10a819c865b46c6d6f2e4ca5bdde6b67f0ed891e81d50size 335929123123version https://git-lfs.github.com/spec/v1oid sha256:3cd3f32fe6851733529a2d81e9c43af427d53dadff692813776b2fbb4c795863size 14645123version https://git-lfs.github.com/spec/v1oid sha256:160f981c8f5e4cc8253ea9051e21df758ff855fda0c1eb9295949baa3a948c45size 1465123version https://git-lfs.github.com/spec/v1oid sha256:d72cb57ce120d4797ec0a544cee3792f228c9dca4cb1863e11cb341f0ec3e576size 201240861234567891011121314151617181920{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": "<BOS_TOKEN>", "clean_up_tokenization_spaces": false, "cls_token": "<CLS>", "eos_token": "<|END_OF_TURN_TOKEN|>", "errors": "replace", "is_local": false, "legacy": true, "mask_token": "<MASK_TOKEN>", "model_max_length": 1000000000000000019884624838656, "pad_token": "<PAD>", "sep_token": "<SEP>", "sp_model_kwargs": {}, "spaces_between_special_tokens": false, "tokenizer_class": "CohereTokenizer", "unk_token": null, "use_default_system_prompt": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384{ "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}123version https://git-lfs.github.com/spec/v1oid sha256:407cd555aa9959596ddc51ec6ac622f10c3d09477a234ddbb2f4510146421a23size 5649123version https://git-lfs.github.com/spec/v1oid sha256:d72cb57ce120d4797ec0a544cee3792f228c9dca4cb1863e11cb341f0ec3e576size 201240861234567891011121314151617181920{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": "<BOS_TOKEN>", "clean_up_tokenization_spaces": false, "cls_token": "<CLS>", "eos_token": "<|END_OF_TURN_TOKEN|>", "errors": "replace", "is_local": false, "legacy": true, "mask_token": "<MASK_TOKEN>", "model_max_length": 1000000000000000019884624838656, "pad_token": "<PAD>", "sep_token": "<SEP>", "sp_model_kwargs": {}, "spaces_between_special_tokens": false, "tokenizer_class": "CohereTokenizer", "unk_token": null, "use_default_system_prompt": false}.gitattributes+2
README.mdAdded+62
adapter_config.jsonAdded+46
adapter_model.safetensorsAdded+3
chat_template.jinjaAdded+1
checkpoint-54/README.mdAdded+209
checkpoint-54/adapter_config.jsonAdded+46
checkpoint-54/adapter_model.safetensorsAdded+3
checkpoint-54/chat_template.jinjaAdded+1
checkpoint-54/optimizer.ptAdded+3
checkpoint-54/rng_state.pthAdded+3
checkpoint-54/scheduler.ptAdded+3
checkpoint-54/tokenizer.jsonAdded+3
checkpoint-54/tokenizer_config.jsonAdded+20
checkpoint-54/trainer_state.jsonAdded+84
checkpoint-54/training_args.binAdded+3
tokenizer.jsonAdded+3
tokenizer_config.jsonAdded+20