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-math-case-6 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-math-case-6. 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-math-case-6 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-math-case-6. 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-math-case-6. 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-math-case-6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use interview-eval/zephyr-7b-math-case-6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="interview-eval/zephyr-7b-math-case-6") 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-math-case-6") model = AutoModelForCausalLM.from_pretrained("interview-eval/zephyr-7b-math-case-6", 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-math-case-6 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-math-case-6" # 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-math-case-6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/interview-eval/zephyr-7b-math-case-6
- SGLang
How to use interview-eval/zephyr-7b-math-case-6 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-math-case-6" \ --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-math-case-6", "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-math-case-6" \ --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-math-case-6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use interview-eval/zephyr-7b-math-case-6 with Docker Model Runner:
docker model run hf.co/interview-eval/zephyr-7b-math-case-6
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+199
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576---library_name: transformerslicense: apache-2.0base_model: alignment-handbook/zephyr-7b-sft-fulltags:- trl- sft- generated_from_trainerdatasets:- generatormodel-index:- name: zephyr-7b-math-case-6 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-math-case-6
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.0198
## 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 ||:-------------:|:-----:|:----:|:---------------:|| 0.8827 | 1.0 | 5 | 0.7429 || 0.6709 | 2.0 | 10 | 0.5531 || 0.5071 | 3.0 | 15 | 0.4035 || 0.3519 | 4.0 | 20 | 0.2455 || 0.2036 | 5.0 | 25 | 0.1302 || 0.1035 | 6.0 | 30 | 0.0602 || 0.0527 | 7.0 | 35 | 0.0356 || 0.0321 | 8.0 | 40 | 0.0249 || 0.0236 | 9.0 | 45 | 0.0206 || 0.0202 | 10.0 | 50 | 0.0198 |
### Framework versions
- Transformers 4.44.2- Pytorch 2.4.1+cu121- Datasets 3.0.0- Tokenizers 0.19.1123456789{ "epoch": 10.0, "total_flos": 20937965568000.0, "train_loss": 0.28585494235157966, "train_runtime": 720.2074, "train_samples": 4000, "train_samples_per_second": 3.652, "train_steps_per_second": 0.069}123456{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": 2, "transformers_version": "4.44.2"}123456789{ "epoch": 10.0, "total_flos": 20937965568000.0, "train_loss": 0.28585494235157966, "train_runtime": 720.2074, "train_samples": 4000, "train_samples_per_second": 3.652, "train_steps_per_second": 0.069}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199{ "best_metric": null, "best_model_checkpoint": null, "epoch": 10.0, "eval_steps": 500, "global_step": 50, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.2, "grad_norm": 24.890761216715067, "learning_rate": 5e-06, "loss": 0.9347, "step": 1 }, { "epoch": 1.0, "grad_norm": 6.27322744929223, "learning_rate": 9.903926402016153e-06, "loss": 0.8827, "step": 5 }, { "epoch": 1.0, "eval_loss": 0.7428836822509766, "eval_runtime": 13.5132, "eval_samples_per_second": 19.463, "eval_steps_per_second": 0.37, "step": 5 }, { "epoch": 2.0, "grad_norm": 3.4763297090491645, "learning_rate": 9.330127018922195e-06, "loss": 0.6709, "step": 10 }, { "epoch": 2.0, "eval_loss": 0.5530853867530823, "eval_runtime": 13.3663, "eval_samples_per_second": 19.676, "eval_steps_per_second": 0.374, "step": 10 }, { "epoch": 3.0, "grad_norm": 3.9858549062244277, "learning_rate": 8.296729075500345e-06, "loss": 0.5071, "step": 15 }, { "epoch": 3.0, "eval_loss": 0.4035380482673645, "eval_runtime": 13.3538, "eval_samples_per_second": 19.695, "eval_steps_per_second": 0.374, "step": 15 }, { "epoch": 4.0, "grad_norm": 4.012038571620908, "learning_rate": 6.913417161825449e-06, "loss": 0.3519, "step": 20 }, { "epoch": 4.0, "eval_loss": 0.24551308155059814, "eval_runtime": 13.3982, "eval_samples_per_second": 19.63, "eval_steps_per_second": 0.373, "step": 20 }, { "epoch": 5.0, "grad_norm": 3.9052862275719975, "learning_rate": 5.327015646150716e-06, "loss": 0.2036, "step": 25 }, { "epoch": 5.0, "eval_loss": 0.1301579624414444, "eval_runtime": 13.3478, "eval_samples_per_second": 19.704, "eval_steps_per_second": 0.375, "step": 25 }, { "epoch": 6.0, "grad_norm": 2.7865230440629105, "learning_rate": 3.705904774487396e-06, "loss": 0.1035, "step": 30 }, { "epoch": 6.0, "eval_loss": 0.060157448053359985, "eval_runtime": 13.3892, "eval_samples_per_second": 19.643, "eval_steps_per_second": 0.373, "step": 30 }, { "epoch": 7.0, "grad_norm": 2.798134146722217, "learning_rate": 2.2221488349019903e-06, "loss": 0.0527, "step": 35 }, { "epoch": 7.0, "eval_loss": 0.03557642176747322, "eval_runtime": 13.3867, "eval_samples_per_second": 19.646, "eval_steps_per_second": 0.374, "step": 35 }, { "epoch": 8.0, "grad_norm": 1.2741605399529363, "learning_rate": 1.0332332985438248e-06, "loss": 0.0321, "step": 40 }, { "epoch": 8.0, "eval_loss": 0.024869758635759354, "eval_runtime": 13.3698, "eval_samples_per_second": 19.671, "eval_steps_per_second": 0.374, "step": 40 }, { "epoch": 9.0, "grad_norm": 0.6581840143146274, "learning_rate": 2.653493525244721e-07, "loss": 0.0236, "step": 45 }, { "epoch": 9.0, "eval_loss": 0.02064005844295025, "eval_runtime": 13.4054, "eval_samples_per_second": 19.619, "eval_steps_per_second": 0.373, "step": 45 }, { "epoch": 10.0, "grad_norm": 0.4976189909335096, "learning_rate": 0.0, "loss": 0.0202, "step": 50 }, { "epoch": 10.0, "eval_loss": 0.019776934757828712, "eval_runtime": 13.3303, "eval_samples_per_second": 19.729, "eval_steps_per_second": 0.375, "step": 50 }, { "epoch": 10.0, "step": 50, "total_flos": 20937965568000.0, "train_loss": 0.28585494235157966, "train_runtime": 720.2074, "train_samples_per_second": 3.652, "train_steps_per_second": 0.069 } ], "logging_steps": 5, "max_steps": 50, "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": 20937965568000.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+199