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-8 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-8. Ask me which dataset to train on, then push the LoRA adapter to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs and Transformers to run batch inference with https://huggingface.co/interview-eval/zephyr-7b-math-case-8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the predictions back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs and Lighteval to evaluate https://huggingface.co/interview-eval/zephyr-7b-math-case-8. 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-8 with Transformers and bitsandbytes. 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-8 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-8 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-8") 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-8") model = AutoModelForCausalLM.from_pretrained("interview-eval/zephyr-7b-math-case-8", 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-8 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-8" # 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-8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/interview-eval/zephyr-7b-math-case-8
- SGLang
How to use interview-eval/zephyr-7b-math-case-8 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-8" \ --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-8", "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-8" \ --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-8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use interview-eval/zephyr-7b-math-case-8 with Docker Model Runner:
docker model run hf.co/interview-eval/zephyr-7b-math-case-8
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+185
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-8 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-8
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.0276
## 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: 4- total_train_batch_size: 32- total_eval_batch_size: 32- 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.0201 | 1.0 | 4 | 0.8704 || 0.9676 | 2.0 | 8 | 0.6483 || 0.7053 | 3.0 | 12 | 0.4601 || 0.4784 | 4.0 | 16 | 0.2716 || 0.2487 | 5.0 | 20 | 0.1375 || 0.2487 | 6.0 | 24 | 0.0688 || 0.1048 | 7.0 | 28 | 0.0426 || 0.0523 | 8.0 | 32 | 0.0332 || 0.0354 | 9.0 | 36 | 0.0287 || 0.0285 | 10.0 | 40 | 0.0276 |
### Framework versions
- Transformers 4.44.2- Pytorch 2.4.1+cu121- Datasets 3.0.0- Tokenizers 0.19.1123456789{ "epoch": 10.0, "total_flos": 8375186227200.0, "train_loss": 0.3289382763206959, "train_runtime": 602.9677, "train_samples": 2000, "train_samples_per_second": 1.775, "train_steps_per_second": 0.066}123456{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": 2, "transformers_version": "4.44.2"}123456789{ "epoch": 10.0, "total_flos": 8375186227200.0, "train_loss": 0.3289382763206959, "train_runtime": 602.9677, "train_samples": 2000, "train_samples_per_second": 1.775, "train_steps_per_second": 0.066}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185{ "best_metric": null, "best_model_checkpoint": null, "epoch": 10.0, "eval_steps": 500, "global_step": 40, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.25, "grad_norm": 36.86391077634519, "learning_rate": 5e-06, "loss": 1.0201, "step": 1 }, { "epoch": 1.0, "eval_loss": 0.8703737258911133, "eval_runtime": 11.8087, "eval_samples_per_second": 9.061, "eval_steps_per_second": 0.339, "step": 4 }, { "epoch": 1.25, "grad_norm": 6.912887702306342, "learning_rate": 9.847001329696653e-06, "loss": 0.9676, "step": 5 }, { "epoch": 2.0, "eval_loss": 0.6482987403869629, "eval_runtime": 10.5317, "eval_samples_per_second": 10.16, "eval_steps_per_second": 0.38, "step": 8 }, { "epoch": 2.5, "grad_norm": 3.426473054986459, "learning_rate": 8.94570254698197e-06, "loss": 0.7053, "step": 10 }, { "epoch": 3.0, "eval_loss": 0.4600563645362854, "eval_runtime": 10.5697, "eval_samples_per_second": 10.123, "eval_steps_per_second": 0.378, "step": 12 }, { "epoch": 3.75, "grad_norm": 3.7980492702489292, "learning_rate": 7.379736965185369e-06, "loss": 0.4784, "step": 15 }, { "epoch": 4.0, "eval_loss": 0.2715964913368225, "eval_runtime": 10.622, "eval_samples_per_second": 10.073, "eval_steps_per_second": 0.377, "step": 16 }, { "epoch": 5.0, "grad_norm": 5.426565998488602, "learning_rate": 5.412896727361663e-06, "loss": 0.2487, "step": 20 }, { "epoch": 5.0, "eval_loss": 0.13748349249362946, "eval_runtime": 10.5895, "eval_samples_per_second": 10.104, "eval_steps_per_second": 0.378, "step": 20 }, { "epoch": 6.0, "eval_loss": 0.0687556117773056, "eval_runtime": 10.6498, "eval_samples_per_second": 10.047, "eval_steps_per_second": 0.376, "step": 24 }, { "epoch": 6.25, "grad_norm": 2.4213215467933678, "learning_rate": 3.3765026539765832e-06, "loss": 0.1048, "step": 25 }, { "epoch": 7.0, "eval_loss": 0.04261770844459534, "eval_runtime": 10.5949, "eval_samples_per_second": 10.099, "eval_steps_per_second": 0.378, "step": 28 }, { "epoch": 7.5, "grad_norm": 1.4054408580810511, "learning_rate": 1.6135921418712959e-06, "loss": 0.0523, "step": 30 }, { "epoch": 8.0, "eval_loss": 0.03317110612988472, "eval_runtime": 10.6578, "eval_samples_per_second": 10.04, "eval_steps_per_second": 0.375, "step": 32 }, { "epoch": 8.75, "grad_norm": 0.8161983996171017, "learning_rate": 4.211333667247125e-07, "loss": 0.0354, "step": 35 }, { "epoch": 9.0, "eval_loss": 0.028676806017756462, "eval_runtime": 10.5748, "eval_samples_per_second": 10.118, "eval_steps_per_second": 0.378, "step": 36 }, { "epoch": 10.0, "grad_norm": 0.6106701044219125, "learning_rate": 0.0, "loss": 0.0285, "step": 40 }, { "epoch": 10.0, "eval_loss": 0.027601005509495735, "eval_runtime": 10.3944, "eval_samples_per_second": 10.294, "eval_steps_per_second": 0.385, "step": 40 }, { "epoch": 10.0, "step": 40, "total_flos": 8375186227200.0, "train_loss": 0.3289382763206959, "train_runtime": 602.9677, "train_samples_per_second": 1.775, "train_steps_per_second": 0.066 } ], "logging_steps": 5, "max_steps": 40, "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": 8375186227200.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+185