Instructions to use cationic/tinyaya-base-dpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cationic/tinyaya-base-dpo with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-base") model = PeftModel.from_pretrained(base_model, "cationic/tinyaya-base-dpo") - Transformers
How to use cationic/tinyaya-base-dpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cationic/tinyaya-base-dpo") 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-dpo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cationic/tinyaya-base-dpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cationic/tinyaya-base-dpo" # 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-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cationic/tinyaya-base-dpo
- SGLang
How to use cationic/tinyaya-base-dpo 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-dpo" \ --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-dpo", "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-dpo" \ --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-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cationic/tinyaya-base-dpo with Docker Model Runner:
docker model run hf.co/cationic/tinyaya-base-dpo
Upload folder using huggingface_hub
Browse filesFiles changed (17)
- README.md+4-4
- adapter_config.json+5-5
- adapter_model.safetensors+2-2
- checkpoint-15/README.md+2-2
- checkpoint-15/adapter_config.json+5-5
- checkpoint-15/adapter_model.safetensors+2-2
- checkpoint-15/optimizer.pt+2-2
- checkpoint-15/ref/adapter_config.json+5-5
- checkpoint-15/ref/adapter_model.safetensors+2-2
- checkpoint-15/tokenizer.json+2-2
- checkpoint-15/tokenizer_config.json+3-3
- checkpoint-15/trainer_state.json+14-14
- checkpoint-15/training_args.bin+1-1
- ref/adapter_config.json+5-5
- ref/adapter_model.safetensors+2-2
- tokenizer.json+2-2
- tokenizer_config.json+3-3
1234567894 unmodified lines1415161718192021 unmodified lines42434445464748---base_model: CohereForAI/aya-expanse-8blibrary_name: peftmodel_name: base_dpotags:- base_model:adapter:CohereForAI/aya-expanse-8b- dpo- lora- transformers4 unmodified lines# Model Card for base_dpoThis 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 start21 unmodified lines- TRL: 0.29.0- Transformers: 5.3.0- Pytorch: 2.10.0- Datasets: 4.7.0- Tokenizers: 0.22.2## Citations1234567894 unmodified lines1415161718192021 unmodified lines42434445464748---base_model: CohereLabs/tiny-aya-baselibrary_name: peftmodel_name: base_dpotags:- base_model:adapter:CohereLabs/tiny-aya-base- dpo- lora- transformers4 unmodified lines# Model Card for base_dpoThis model is a fine-tuned version of [CohereLabs/tiny-aya-base](https://huggingface.co/CohereLabs/tiny-aya-base).It has been trained using [TRL](https://github.com/huggingface/trl).## Quick start21 unmodified lines- TRL: 0.29.0- Transformers: 5.3.0- Pytorch: 2.10.0- Datasets: 4.8.3- Tokenizers: 0.22.2## Citations
2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"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,20 unmodified lines"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",2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"alpha_pattern": {},"arrow_config": null,"auto_mapping": null,"base_model_name_or_path": "CohereLabs/tiny-aya-base","bias": "none","corda_config": null,"ensure_weight_tying": false,20 unmodified lines"revision": null,"target_modules": ["q_proj","k_proj","o_proj","up_proj","v_proj","down_proj","gate_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",
123version https://git-lfs.github.com/spec/v1oid sha256:db467a2e6ded99b842b17ff70e0cd30ab29af6e5edf8e25815306aab9ed2971dsize 167832240123version https://git-lfs.github.com/spec/v1oid sha256:0a6eeecf40c6db9e5588467babd1e4390df88a826da87e404890b843ed89beadsize 120981200
123456789---base_model: CohereForAI/aya-expanse-8blibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:CohereForAI/aya-expanse-8b- dpo- lora- transformers123456789---base_model: CohereLabs/tiny-aya-baselibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:CohereLabs/tiny-aya-base- dpo- lora- transformers
2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"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,20 unmodified lines"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",2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"alpha_pattern": {},"arrow_config": null,"auto_mapping": null,"base_model_name_or_path": "CohereLabs/tiny-aya-base","bias": "none","corda_config": null,"ensure_weight_tying": false,20 unmodified lines"revision": null,"target_modules": ["q_proj","k_proj","o_proj","up_proj","v_proj","down_proj","gate_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",
123version https://git-lfs.github.com/spec/v1oid sha256:db467a2e6ded99b842b17ff70e0cd30ab29af6e5edf8e25815306aab9ed2971dsize 167832240123version https://git-lfs.github.com/spec/v1oid sha256:0a6eeecf40c6db9e5588467babd1e4390df88a826da87e404890b843ed89beadsize 120981200
123version https://git-lfs.github.com/spec/v1oid sha256:cb8ec488fe6f7af27e41098c7ca30778e8135c0ae3a2030f0fa78668ecace32esize 335929123123version https://git-lfs.github.com/spec/v1oid sha256:e1dcf2ecb817ca23bf8fc4ebb941e743a381688d80d510c1a0cf8306b8c2ee23size 242259659
2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"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,20 unmodified lines"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",2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"alpha_pattern": {},"arrow_config": null,"auto_mapping": null,"base_model_name_or_path": "CohereLabs/tiny-aya-base","bias": "none","corda_config": null,"ensure_weight_tying": false,20 unmodified lines"revision": null,"target_modules": ["q_proj","k_proj","o_proj","up_proj","v_proj","down_proj","gate_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",
123version https://git-lfs.github.com/spec/v1oid sha256:37a56e30a5cd3d700ff121b2810cc55ba52a35ab186942ea53898b508426a067size 83946192123version https://git-lfs.github.com/spec/v1oid sha256:51cf1f4b51f98d4bb2ab367ccd886c36cc66d553f81d2e83059837903ffe1778size 60524472
123version https://git-lfs.github.com/spec/v1oid sha256:d72cb57ce120d4797ec0a544cee3792f228c9dca4cb1863e11cb341f0ec3e576size 20124086123version https://git-lfs.github.com/spec/v1oid sha256:5cd77e5246a42d44b52e94cb02bfe1ff1693e4315d8bf5bd264681710c03c6afsize 21374786
3 unmodified lines4567891011122 unmodified lines1516171819203 unmodified lines"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,2 unmodified lines"sp_model_kwargs": {},"spaces_between_special_tokens": false,"tokenizer_class": "CohereTokenizer","unk_token": null,"use_default_system_prompt": false}3 unmodified lines4567891011122 unmodified lines1516171819203 unmodified lines"bos_token": "<BOS_TOKEN>","clean_up_tokenization_spaces": false,"cls_token": "<CLS>","eos_token": "<EOS_TOKEN>","errors": "replace","is_local": true,"legacy": true,"mask_token": "<MASK_TOKEN>","model_max_length": 1000000000000000019884624838656,2 unmodified lines"sp_model_kwargs": {},"spaces_between_special_tokens": false,"tokenizer_class": "CohereTokenizer","unk_token": "<UNK>","use_default_system_prompt": false}
9 unmodified lines10111213141516171819202122232425262728293014 unmodified lines454647484950519 unmodified lines"is_world_process_zero": true,"log_history": [{"entropy": 1.6097802864877802,"epoch": 2.0,"grad_norm": 0.081545390188694,"learning_rate": 6.909830056250527e-05,"logits/chosen": 1.135637378023223,"logits/rejected": 1.1737397978498365,"logps/chosen": -201.05456803974351,"logps/rejected": -248.0248629921361,"loss": 0.37813677787780764,"mean_token_accuracy": 0.4706153202998011,"num_tokens": 34538.0,"rewards/accuracies": 0.756578947368421,"rewards/chosen": 0.6639514451748446,"rewards/margins": 1.841196086649832,"rewards/rejected": -1.1772446451267522,"step": 10}],14 unmodified lines"attributes": {}}},"total_flos": 3521274310950912.0,"train_batch_size": 4,"trial_name": null,"trial_params": null9 unmodified lines10111213141516171819202122232425262728293014 unmodified lines454647484950519 unmodified lines"is_world_process_zero": true,"log_history": [{"entropy": 2.091383949706429,"epoch": 2.0,"grad_norm": 0.143918976187706,"learning_rate": 6.909830056250527e-05,"logits/chosen": -2.6255019325219764,"logits/rejected": -2.659680873301937,"logps/chosen": -208.22477260388825,"logps/rejected": -238.7575555098684,"loss": 0.45360164642333983,"mean_token_accuracy": 0.47160694003105164,"num_tokens": 34910.0,"rewards/accuracies": 0.7302631578947368,"rewards/chosen": 0.3593159549391681,"rewards/margins": 0.8960761683747956,"rewards/rejected": -0.5367602110399228,"step": 10}],14 unmodified lines"attributes": {}}},"total_flos": 1447691195695104.0,"train_batch_size": 4,"trial_name": null,"trial_params": null
123version https://git-lfs.github.com/spec/v1oid sha256:56f2535013460d339bc97fe84138a5fb2a89ca0f8f6d8d41d6edd9b792763a90size 5841123version https://git-lfs.github.com/spec/v1oid sha256:9a760a647b55cf71029eb7fe81ef09d1df5449c3aca773d514abd1884660ada8size 5841
2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"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,20 unmodified lines"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",2 unmodified lines345678920 unmodified lines3031323334353637383940412 unmodified lines"alpha_pattern": {},"arrow_config": null,"auto_mapping": null,"base_model_name_or_path": "CohereLabs/tiny-aya-base","bias": "none","corda_config": null,"ensure_weight_tying": false,20 unmodified lines"revision": null,"target_modules": ["q_proj","k_proj","o_proj","up_proj","v_proj","down_proj","gate_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",
123version https://git-lfs.github.com/spec/v1oid sha256:37a56e30a5cd3d700ff121b2810cc55ba52a35ab186942ea53898b508426a067size 83946192123version https://git-lfs.github.com/spec/v1oid sha256:51cf1f4b51f98d4bb2ab367ccd886c36cc66d553f81d2e83059837903ffe1778size 60524472
123version https://git-lfs.github.com/spec/v1oid sha256:d72cb57ce120d4797ec0a544cee3792f228c9dca4cb1863e11cb341f0ec3e576size 20124086123version https://git-lfs.github.com/spec/v1oid sha256:5cd77e5246a42d44b52e94cb02bfe1ff1693e4315d8bf5bd264681710c03c6afsize 21374786
3 unmodified lines4567891011122 unmodified lines1516171819203 unmodified lines"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,2 unmodified lines"sp_model_kwargs": {},"spaces_between_special_tokens": false,"tokenizer_class": "CohereTokenizer","unk_token": null,"use_default_system_prompt": false}3 unmodified lines4567891011122 unmodified lines1516171819203 unmodified lines"bos_token": "<BOS_TOKEN>","clean_up_tokenization_spaces": false,"cls_token": "<CLS>","eos_token": "<EOS_TOKEN>","errors": "replace","is_local": true,"legacy": true,"mask_token": "<MASK_TOKEN>","model_max_length": 1000000000000000019884624838656,2 unmodified lines"sp_model_kwargs": {},"spaces_between_special_tokens": false,"tokenizer_class": "CohereTokenizer","unk_token": "<UNK>","use_default_system_prompt": false}
README.md+4-4
adapter_config.json+5-5
adapter_model.safetensors+2-2
checkpoint-15/README.md+2-2
checkpoint-15/adapter_config.json+5-5
checkpoint-15/adapter_model.safetensors+2-2
checkpoint-15/optimizer.pt+2-2
checkpoint-15/ref/adapter_config.json+5-5
checkpoint-15/ref/adapter_model.safetensors+2-2
checkpoint-15/tokenizer.json+2-2
checkpoint-15/tokenizer_config.json+3-3
checkpoint-15/trainer_state.json+14-14
checkpoint-15/training_args.bin+1-1
ref/adapter_config.json+5-5
ref/adapter_model.safetensors+2-2
tokenizer.json+2-2
tokenizer_config.json+3-3