Instructions to use RoseG/Ghastly2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RoseG/Ghastly2.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RoseG/Ghastly2.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RoseG/Ghastly2.0") model = AutoModelForCausalLM.from_pretrained("RoseG/Ghastly2.0", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RoseG/Ghastly2.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RoseG/Ghastly2.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RoseG/Ghastly2.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RoseG/Ghastly2.0
- SGLang
How to use RoseG/Ghastly2.0 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 "RoseG/Ghastly2.0" \ --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": "RoseG/Ghastly2.0", "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 "RoseG/Ghastly2.0" \ --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": "RoseG/Ghastly2.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RoseG/Ghastly2.0 with Docker Model Runner:
docker model run hf.co/RoseG/Ghastly2.0
Download trainer_state.json from RoseG/Ghastly2.0: direct link, hf CLI and curl.
- Browser
- Download file 4.86 kB
-
https://huggingface.co/RoseG/Ghastly2.0/resolve/main/trainer_state.json
- Command line
-
hf download hf://RoseG/Ghastly2.0/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/RoseG/Ghastly2.0/resolve/main/trainer_state.json
4.86 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 25, | |
| "global_step": 25, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.04, | |
| "grad_norm": 11.906526565551758, | |
| "learning_rate": 1e-05, | |
| "loss": 3.9824, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 0.08, | |
| "grad_norm": 10.312734603881836, | |
| "learning_rate": 9.960573506572391e-06, | |
| "loss": 3.0566, | |
| "step": 2 | |
| }, | |
| { | |
| "epoch": 0.12, | |
| "grad_norm": 8.302469253540039, | |
| "learning_rate": 9.842915805643156e-06, | |
| "loss": 3.3672, | |
| "step": 3 | |
| }, | |
| { | |
| "epoch": 0.16, | |
| "grad_norm": 6.608037948608398, | |
| "learning_rate": 9.648882429441258e-06, | |
| "loss": 2.8311, | |
| "step": 4 | |
| }, | |
| { | |
| "epoch": 0.2, | |
| "grad_norm": 14.191883087158203, | |
| "learning_rate": 9.381533400219319e-06, | |
| "loss": 2.708, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.24, | |
| "grad_norm": 6.756547927856445, | |
| "learning_rate": 9.045084971874738e-06, | |
| "loss": 2.3594, | |
| "step": 6 | |
| }, | |
| { | |
| "epoch": 0.28, | |
| "grad_norm": 5.778897762298584, | |
| "learning_rate": 8.644843137107058e-06, | |
| "loss": 2.4609, | |
| "step": 7 | |
| }, | |
| { | |
| "epoch": 0.32, | |
| "grad_norm": 5.335056304931641, | |
| "learning_rate": 8.18711994874345e-06, | |
| "loss": 2.0332, | |
| "step": 8 | |
| }, | |
| { | |
| "epoch": 0.36, | |
| "grad_norm": 4.212027549743652, | |
| "learning_rate": 7.679133974894984e-06, | |
| "loss": 1.8252, | |
| "step": 9 | |
| }, | |
| { | |
| "epoch": 0.4, | |
| "grad_norm": 4.6606645584106445, | |
| "learning_rate": 7.128896457825364e-06, | |
| "loss": 1.9766, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.44, | |
| "grad_norm": 5.510636806488037, | |
| "learning_rate": 6.545084971874738e-06, | |
| "loss": 1.6396, | |
| "step": 11 | |
| }, | |
| { | |
| "epoch": 0.48, | |
| "grad_norm": 5.5493083000183105, | |
| "learning_rate": 5.936906572928625e-06, | |
| "loss": 1.7842, | |
| "step": 12 | |
| }, | |
| { | |
| "epoch": 0.52, | |
| "grad_norm": 4.463563442230225, | |
| "learning_rate": 5.3139525976465675e-06, | |
| "loss": 1.8247, | |
| "step": 13 | |
| }, | |
| { | |
| "epoch": 0.56, | |
| "grad_norm": 5.195663928985596, | |
| "learning_rate": 4.686047402353433e-06, | |
| "loss": 2.0312, | |
| "step": 14 | |
| }, | |
| { | |
| "epoch": 0.6, | |
| "grad_norm": 4.842907428741455, | |
| "learning_rate": 4.063093427071376e-06, | |
| "loss": 1.8457, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.64, | |
| "grad_norm": 3.943223714828491, | |
| "learning_rate": 3.4549150281252635e-06, | |
| "loss": 1.6304, | |
| "step": 16 | |
| }, | |
| { | |
| "epoch": 0.68, | |
| "grad_norm": 4.790521621704102, | |
| "learning_rate": 2.871103542174637e-06, | |
| "loss": 1.7695, | |
| "step": 17 | |
| }, | |
| { | |
| "epoch": 0.72, | |
| "grad_norm": 4.638957977294922, | |
| "learning_rate": 2.320866025105016e-06, | |
| "loss": 1.6235, | |
| "step": 18 | |
| }, | |
| { | |
| "epoch": 0.76, | |
| "grad_norm": 5.3421430587768555, | |
| "learning_rate": 1.8128800512565514e-06, | |
| "loss": 1.6714, | |
| "step": 19 | |
| }, | |
| { | |
| "epoch": 0.8, | |
| "grad_norm": 4.2450408935546875, | |
| "learning_rate": 1.3551568628929434e-06, | |
| "loss": 1.5586, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.84, | |
| "grad_norm": 4.925183296203613, | |
| "learning_rate": 9.549150281252633e-07, | |
| "loss": 1.7876, | |
| "step": 21 | |
| }, | |
| { | |
| "epoch": 0.88, | |
| "grad_norm": 4.280679225921631, | |
| "learning_rate": 6.184665997806832e-07, | |
| "loss": 1.5791, | |
| "step": 22 | |
| }, | |
| { | |
| "epoch": 0.92, | |
| "grad_norm": 4.112889289855957, | |
| "learning_rate": 3.511175705587433e-07, | |
| "loss": 1.4775, | |
| "step": 23 | |
| }, | |
| { | |
| "epoch": 0.96, | |
| "grad_norm": 4.36607027053833, | |
| "learning_rate": 1.5708419435684463e-07, | |
| "loss": 1.6782, | |
| "step": 24 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 3.5276408195495605, | |
| "learning_rate": 3.9426493427611177e-08, | |
| "loss": 1.248, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 1.640625, | |
| "eval_runtime": 0.557, | |
| "eval_samples_per_second": 1.795, | |
| "eval_steps_per_second": 1.795, | |
| "step": 25 | |
| } | |
| ], | |
| "logging_steps": 1.0, | |
| "max_steps": 25, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 0, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 4039978250141696.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |