Text Generation
Transformers
Safetensors
mistral
alignment-handbook
trl
sft
Generated from Trainer
conversational
text-generation-inference
Run this model with HF Jobs
Run interview-eval/zephyr-7b-stem-case-7 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/interview-eval/zephyr-7b-stem-case-7. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/interview-eval/zephyr-7b-stem-case-7 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/interview-eval/zephyr-7b-stem-case-7. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/interview-eval/zephyr-7b-stem-case-7. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use interview-eval/zephyr-7b-stem-case-7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use interview-eval/zephyr-7b-stem-case-7 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="interview-eval/zephyr-7b-stem-case-7") 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("interview-eval/zephyr-7b-stem-case-7") model = AutoModelForCausalLM.from_pretrained("interview-eval/zephyr-7b-stem-case-7", 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 interview-eval/zephyr-7b-stem-case-7 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "interview-eval/zephyr-7b-stem-case-7" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "interview-eval/zephyr-7b-stem-case-7", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/interview-eval/zephyr-7b-stem-case-7
- SGLang
How to use interview-eval/zephyr-7b-stem-case-7 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 "interview-eval/zephyr-7b-stem-case-7" \ --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": "interview-eval/zephyr-7b-stem-case-7", "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 "interview-eval/zephyr-7b-stem-case-7" \ --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": "interview-eval/zephyr-7b-stem-case-7", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use interview-eval/zephyr-7b-stem-case-7 with Docker Model Runner:
docker model run hf.co/interview-eval/zephyr-7b-stem-case-7
Juyoung Suk commited on
Model save
Browse filesFiles changed (5)
- README.mdAdded+76
- all_results.jsonAdded+9
- generation_config.jsonAdded+6
- train_results.jsonAdded+9
- trainer_state.jsonAdded+227
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576---library_name: transformerslicense: apache-2.0base_model: alignment-handbook/zephyr-7b-sft-fulltags:- trl- sft- generated_from_trainerdatasets:- generatormodel-index:- name: zephyr-7b-stem-case-7 results: []---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# zephyr-7b-stem-case-7
This model is a fine-tuned version of [alignment-handbook/zephyr-7b-sft-full](https://huggingface.co/alignment-handbook/zephyr-7b-sft-full) on the generator dataset.It achieves the following results on the evaluation set:- Loss: 0.0095
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 1e-05- train_batch_size: 8- eval_batch_size: 8- seed: 42- distributed_type: multi-GPU- num_devices: 8- total_train_batch_size: 64- total_eval_batch_size: 64- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_ratio: 0.03- num_epochs: 10
### Training results
| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:----:|:---------------:|| 1.035 | 1.0 | 7 | 0.8066 || 0.8612 | 2.0 | 14 | 0.5046 || 0.4464 | 3.0 | 21 | 0.2836 || 0.2872 | 4.0 | 28 | 0.1444 || 0.1132 | 5.0 | 35 | 0.0621 || 0.0555 | 6.0 | 42 | 0.0280 || 0.0371 | 7.0 | 49 | 0.0172 || 0.017 | 8.0 | 56 | 0.0122 || 0.0126 | 9.0 | 63 | 0.0100 || 0.0099 | 10.0 | 70 | 0.0095 |
### Framework versions
- Transformers 4.44.2- Pytorch 2.4.1+cu121- Datasets 3.0.0- Tokenizers 0.19.1123456789{ "epoch": 10.0, "total_flos": 29313151795200.0, "train_loss": 0.2696564427443913, "train_runtime": 988.8828, "train_samples": 2847, "train_samples_per_second": 4.53, "train_steps_per_second": 0.071}123456{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": 2, "transformers_version": "4.44.2"}123456789{ "epoch": 10.0, "total_flos": 29313151795200.0, "train_loss": 0.2696564427443913, "train_runtime": 988.8828, "train_samples": 2847, "train_samples_per_second": 4.53, "train_steps_per_second": 0.071}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227{ "best_metric": null, "best_model_checkpoint": null, "epoch": 10.0, "eval_steps": 500, "global_step": 70, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.14285714285714285, "grad_norm": 7.2481944316327, "learning_rate": 3.3333333333333333e-06, "loss": 1.1087, "step": 1 }, { "epoch": 0.7142857142857143, "grad_norm": 6.492266623182951, "learning_rate": 9.978029910109491e-06, "loss": 1.035, "step": 5 }, { "epoch": 1.0, "eval_loss": 0.8065708875656128, "eval_runtime": 18.8479, "eval_samples_per_second": 23.769, "eval_steps_per_second": 0.371, "step": 7 }, { "epoch": 1.4285714285714286, "grad_norm": 4.2798539792652965, "learning_rate": 9.733078376452172e-06, "loss": 0.8612, "step": 10 }, { "epoch": 2.0, "eval_loss": 0.5046278834342957, "eval_runtime": 18.7201, "eval_samples_per_second": 23.931, "eval_steps_per_second": 0.374, "step": 14 }, { "epoch": 2.142857142857143, "grad_norm": 3.8618869981058155, "learning_rate": 9.229160296295488e-06, "loss": 0.6608, "step": 15 }, { "epoch": 2.857142857142857, "grad_norm": 2.5003252439116106, "learning_rate": 8.49384713889421e-06, "loss": 0.4464, "step": 20 }, { "epoch": 3.0, "eval_loss": 0.2836165726184845, "eval_runtime": 18.7006, "eval_samples_per_second": 23.956, "eval_steps_per_second": 0.374, "step": 21 }, { "epoch": 3.571428571428571, "grad_norm": 3.8783540297730106, "learning_rate": 7.56737096757421e-06, "loss": 0.2872, "step": 25 }, { "epoch": 4.0, "eval_loss": 0.14440329372882843, "eval_runtime": 18.7131, "eval_samples_per_second": 23.94, "eval_steps_per_second": 0.374, "step": 28 }, { "epoch": 4.285714285714286, "grad_norm": 2.6373488856495295, "learning_rate": 6.500423175001705e-06, "loss": 0.1884, "step": 30 }, { "epoch": 5.0, "grad_norm": 2.524435640105693, "learning_rate": 5.351380944726465e-06, "loss": 0.1132, "step": 35 }, { "epoch": 5.0, "eval_loss": 0.062061700969934464, "eval_runtime": 18.7255, "eval_samples_per_second": 23.925, "eval_steps_per_second": 0.374, "step": 35 }, { "epoch": 5.714285714285714, "grad_norm": 1.7870565823017404, "learning_rate": 4.183113190907349e-06, "loss": 0.0555, "step": 40 }, { "epoch": 6.0, "eval_loss": 0.028033925220370293, "eval_runtime": 18.7711, "eval_samples_per_second": 23.866, "eval_steps_per_second": 0.373, "step": 42 }, { "epoch": 6.428571428571429, "grad_norm": 0.93279002933571, "learning_rate": 3.059540736638751e-06, "loss": 0.0371, "step": 45 }, { "epoch": 7.0, "eval_loss": 0.017189698293805122, "eval_runtime": 18.7331, "eval_samples_per_second": 23.915, "eval_steps_per_second": 0.374, "step": 49 }, { "epoch": 7.142857142857143, "grad_norm": 0.6713728183393005, "learning_rate": 2.042138937932388e-06, "loss": 0.0254, "step": 50 }, { "epoch": 7.857142857142857, "grad_norm": 0.6733311496948943, "learning_rate": 1.186574109448091e-06, "loss": 0.017, "step": 55 }, { "epoch": 8.0, "eval_loss": 0.012202958576381207, "eval_runtime": 18.6716, "eval_samples_per_second": 23.994, "eval_steps_per_second": 0.375, "step": 56 }, { "epoch": 8.571428571428571, "grad_norm": 0.3925640628854087, "learning_rate": 5.396577872130676e-07, "loss": 0.0126, "step": 60 }, { "epoch": 9.0, "eval_loss": 0.0099651413038373, "eval_runtime": 18.7021, "eval_samples_per_second": 23.955, "eval_steps_per_second": 0.374, "step": 63 }, { "epoch": 9.285714285714286, "grad_norm": 0.30666444604194676, "learning_rate": 1.3678547337593494e-07, "loss": 0.0107, "step": 65 }, { "epoch": 10.0, "grad_norm": 0.3132195964128779, "learning_rate": 0.0, "loss": 0.0099, "step": 70 }, { "epoch": 10.0, "eval_loss": 0.009540632367134094, "eval_runtime": 18.6112, "eval_samples_per_second": 24.071, "eval_steps_per_second": 0.376, "step": 70 }, { "epoch": 10.0, "step": 70, "total_flos": 29313151795200.0, "train_loss": 0.2696564427443913, "train_runtime": 988.8828, "train_samples_per_second": 4.53, "train_steps_per_second": 0.071 } ], "logging_steps": 5, "max_steps": 70, "num_input_tokens_seen": 0, "num_train_epochs": 10, "save_steps": 100, "stateful_callbacks": { "TrainerControl": { "args": { "should_epoch_stop": false, "should_evaluate": false, "should_log": false, "should_save": true, "should_training_stop": true }, "attributes": {} } }, "total_flos": 29313151795200.0, "train_batch_size": 8, "trial_name": null, "trial_params": null}README.mdAdded+76
all_results.jsonAdded+9
generation_config.jsonAdded+6
train_results.jsonAdded+9
trainer_state.jsonAdded+227