Instructions to use Hugging-GK/stack_exc_multilabel_base_lm_head with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Hugging-GK/stack_exc_multilabel_base_lm_head with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b") model = PeftModel.from_pretrained(base_model, "Hugging-GK/stack_exc_multilabel_base_lm_head") - Transformers
How to use Hugging-GK/stack_exc_multilabel_base_lm_head with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hugging-GK/stack_exc_multilabel_base_lm_head")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Hugging-GK/stack_exc_multilabel_base_lm_head", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Hugging-GK/stack_exc_multilabel_base_lm_head with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hugging-GK/stack_exc_multilabel_base_lm_head" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hugging-GK/stack_exc_multilabel_base_lm_head", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Hugging-GK/stack_exc_multilabel_base_lm_head
- SGLang
How to use Hugging-GK/stack_exc_multilabel_base_lm_head 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 "Hugging-GK/stack_exc_multilabel_base_lm_head" \ --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": "Hugging-GK/stack_exc_multilabel_base_lm_head", "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 "Hugging-GK/stack_exc_multilabel_base_lm_head" \ --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": "Hugging-GK/stack_exc_multilabel_base_lm_head", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Hugging-GK/stack_exc_multilabel_base_lm_head with Docker Model Runner:
docker model run hf.co/Hugging-GK/stack_exc_multilabel_base_lm_head
Download trainer_state.json from Hugging-GK/stack_exc_multilabel_base_lm_head: direct link, hf CLI and curl.
- Browser
- Download file 3.99 kB
-
https://huggingface.co/Hugging-GK/stack_exc_multilabel_base_lm_head/resolve/main/trainer_state.json
- Command line
-
hf download hf://Hugging-GK/stack_exc_multilabel_base_lm_head/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/Hugging-GK/stack_exc_multilabel_base_lm_head/resolve/main/trainer_state.json
3.99 kB
| { | |
| "best_global_step": 100, | |
| "best_metric": 0.09543673694133759, | |
| "best_model_checkpoint": "/content/models/gemma_qlora_lmh/checkpoint-100", | |
| "epoch": 1.7008547008547008, | |
| "eval_steps": 20, | |
| "global_step": 100, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 2.4621351063251495, | |
| "epoch": 0.3418803418803419, | |
| "grad_norm": 6.045567035675049, | |
| "learning_rate": 8.389830508474577e-06, | |
| "loss": 0.3829, | |
| "mean_token_accuracy": 0.8746399849653244, | |
| "num_tokens": 113164.0, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.3418803418803419, | |
| "eval_entropy": 2.310356734145401, | |
| "eval_loss": 0.14163336157798767, | |
| "eval_mean_token_accuracy": 0.9525125485200149, | |
| "eval_num_tokens": 113164.0, | |
| "eval_runtime": 46.7154, | |
| "eval_samples_per_second": 39.816, | |
| "eval_steps_per_second": 2.505, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 2.3071940779685973, | |
| "epoch": 0.6837606837606838, | |
| "grad_norm": 2.0642659664154053, | |
| "learning_rate": 6.694915254237288e-06, | |
| "loss": 0.1358, | |
| "mean_token_accuracy": 0.9574040338397026, | |
| "num_tokens": 225335.0, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.6837606837606838, | |
| "eval_entropy": 2.279157841307485, | |
| "eval_loss": 0.11512647569179535, | |
| "eval_mean_token_accuracy": 0.9622599701596122, | |
| "eval_num_tokens": 225335.0, | |
| "eval_runtime": 45.5615, | |
| "eval_samples_per_second": 40.824, | |
| "eval_steps_per_second": 2.568, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 2.3005140133393116, | |
| "epoch": 1.017094017094017, | |
| "grad_norm": 2.1764779090881348, | |
| "learning_rate": 5e-06, | |
| "loss": 0.113, | |
| "mean_token_accuracy": 0.9657797859265254, | |
| "num_tokens": 330390.0, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 1.017094017094017, | |
| "eval_entropy": 2.293168124989567, | |
| "eval_loss": 0.10884715616703033, | |
| "eval_mean_token_accuracy": 0.9645043224351019, | |
| "eval_num_tokens": 330390.0, | |
| "eval_runtime": 46.0807, | |
| "eval_samples_per_second": 40.364, | |
| "eval_steps_per_second": 2.539, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 2.27779643535614, | |
| "epoch": 1.358974358974359, | |
| "grad_norm": 2.2281429767608643, | |
| "learning_rate": 3.305084745762712e-06, | |
| "loss": 0.0849, | |
| "mean_token_accuracy": 0.9723166093230248, | |
| "num_tokens": 440357.0, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 1.358974358974359, | |
| "eval_entropy": 2.2607989514994826, | |
| "eval_loss": 0.10449662059545517, | |
| "eval_mean_token_accuracy": 0.9651819151690882, | |
| "eval_num_tokens": 440357.0, | |
| "eval_runtime": 46.3813, | |
| "eval_samples_per_second": 40.102, | |
| "eval_steps_per_second": 2.523, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 2.2726868212223055, | |
| "epoch": 1.7008547008547008, | |
| "grad_norm": 1.7332485914230347, | |
| "learning_rate": 1.6101694915254237e-06, | |
| "loss": 0.0719, | |
| "mean_token_accuracy": 0.9728455126285553, | |
| "num_tokens": 552807.0, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 1.7008547008547008, | |
| "eval_entropy": 2.2467452420128717, | |
| "eval_loss": 0.09543673694133759, | |
| "eval_mean_token_accuracy": 0.9682549915762029, | |
| "eval_num_tokens": 552807.0, | |
| "eval_runtime": 46.2095, | |
| "eval_samples_per_second": 40.251, | |
| "eval_steps_per_second": 2.532, | |
| "step": 100 | |
| } | |
| ], | |
| "logging_steps": 20, | |
| "max_steps": 118, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 2, | |
| "save_steps": 20, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 1.614440163723264e+16, | |
| "train_batch_size": 16, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |