Instructions to use 0chanly/cai-consequentialist with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use 0chanly/cai-consequentialist with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1") model = PeftModel.from_pretrained(base_model, "0chanly/cai-consequentialist") - Transformers
How to use 0chanly/cai-consequentialist with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="0chanly/cai-consequentialist")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("0chanly/cai-consequentialist", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 0chanly/cai-consequentialist with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "0chanly/cai-consequentialist" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0chanly/cai-consequentialist", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/0chanly/cai-consequentialist
- SGLang
How to use 0chanly/cai-consequentialist 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 "0chanly/cai-consequentialist" \ --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": "0chanly/cai-consequentialist", "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 "0chanly/cai-consequentialist" \ --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": "0chanly/cai-consequentialist", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 0chanly/cai-consequentialist with Docker Model Runner:
docker model run hf.co/0chanly/cai-consequentialist
Download checkpoint-113/trainer_state.json from 0chanly/cai-consequentialist: direct link, hf CLI and curl.
- Browser
- Download file 2.8 kB
-
https://huggingface.co/0chanly/cai-consequentialist/resolve/main/checkpoint-113/trainer_state.json
- Command line
-
hf download hf://0chanly/cai-consequentialist/checkpoint-113/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/0chanly/cai-consequentialist/resolve/main/checkpoint-113/trainer_state.json
2.8 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 113, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.08888888888888889, | |
| "grad_norm": 1.3860198259353638, | |
| "learning_rate": 3.6e-05, | |
| "loss": 1.4089, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.17777777777777778, | |
| "grad_norm": 1.945064663887024, | |
| "learning_rate": 7.6e-05, | |
| "loss": 1.2541, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.26666666666666666, | |
| "grad_norm": 1.5190799236297607, | |
| "learning_rate": 0.000116, | |
| "loss": 1.0915, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.35555555555555557, | |
| "grad_norm": 1.624822735786438, | |
| "learning_rate": 0.00015600000000000002, | |
| "loss": 1.1231, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.4444444444444444, | |
| "grad_norm": 1.3709652423858643, | |
| "learning_rate": 0.000196, | |
| "loss": 1.0294, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.5333333333333333, | |
| "grad_norm": 1.4600133895874023, | |
| "learning_rate": 0.00018977272727272728, | |
| "loss": 1.0663, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.6222222222222222, | |
| "grad_norm": 1.397749662399292, | |
| "learning_rate": 0.00017840909090909092, | |
| "loss": 1.0412, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.7111111111111111, | |
| "grad_norm": 1.1549971103668213, | |
| "learning_rate": 0.00016704545454545455, | |
| "loss": 0.9761, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.8, | |
| "grad_norm": 1.229239583015442, | |
| "learning_rate": 0.00015568181818181818, | |
| "loss": 1.0562, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.8888888888888888, | |
| "grad_norm": 1.3344461917877197, | |
| "learning_rate": 0.00014431818181818182, | |
| "loss": 1.0214, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.9777777777777777, | |
| "grad_norm": 1.0738836526870728, | |
| "learning_rate": 0.00013295454545454548, | |
| "loss": 0.9623, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 1.0325431823730469, | |
| "eval_runtime": 6.5587, | |
| "eval_samples_per_second": 15.247, | |
| "eval_steps_per_second": 1.982, | |
| "step": 113 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 226, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 2, | |
| "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": 2.96023945641984e+16, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |