Text Generation
Transformers
Safetensors
mistral
alignment-handbook
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use interview-eval/zephyr-7b-math-case-6-ep5 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-ep5 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-ep5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("interview-eval/zephyr-7b-math-case-6-ep5") model = AutoModelForCausalLM.from_pretrained("interview-eval/zephyr-7b-math-case-6-ep5", 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=40) 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-ep5 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-ep5" # 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-ep5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/interview-eval/zephyr-7b-math-case-6-ep5
- SGLang
How to use interview-eval/zephyr-7b-math-case-6-ep5 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-ep5" \ --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-ep5", "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-ep5" \ --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-ep5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use interview-eval/zephyr-7b-math-case-6-ep5 with Docker Model Runner:
docker model run hf.co/interview-eval/zephyr-7b-math-case-6-ep5
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 5.0, | |
| "eval_steps": 500, | |
| "global_step": 25, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.2, | |
| "grad_norm": 24.8895814604259, | |
| "learning_rate": 1e-05, | |
| "loss": 0.9347, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 10.507921581694449, | |
| "learning_rate": 9.330127018922195e-06, | |
| "loss": 1.0402, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 0.750956118106842, | |
| "eval_runtime": 13.4777, | |
| "eval_samples_per_second": 19.514, | |
| "eval_steps_per_second": 0.371, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "grad_norm": 3.2842066334321927, | |
| "learning_rate": 6.913417161825449e-06, | |
| "loss": 0.691, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 0.5700622200965881, | |
| "eval_runtime": 13.3794, | |
| "eval_samples_per_second": 19.657, | |
| "eval_steps_per_second": 0.374, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "grad_norm": 3.0707933492232007, | |
| "learning_rate": 3.705904774487396e-06, | |
| "loss": 0.5239, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 0.426382839679718, | |
| "eval_runtime": 13.3851, | |
| "eval_samples_per_second": 19.649, | |
| "eval_steps_per_second": 0.374, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "grad_norm": 3.1454642852295103, | |
| "learning_rate": 1.0332332985438248e-06, | |
| "loss": 0.3917, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "eval_loss": 0.33590540289878845, | |
| "eval_runtime": 13.3827, | |
| "eval_samples_per_second": 19.652, | |
| "eval_steps_per_second": 0.374, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "grad_norm": 2.732790702100083, | |
| "learning_rate": 0.0, | |
| "loss": 0.3221, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "eval_loss": 0.31167706847190857, | |
| "eval_runtime": 13.3175, | |
| "eval_samples_per_second": 19.749, | |
| "eval_steps_per_second": 0.375, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "step": 25, | |
| "total_flos": 10468982784000.0, | |
| "train_loss": 0.5895810270309448, | |
| "train_runtime": 388.4587, | |
| "train_samples_per_second": 3.385, | |
| "train_steps_per_second": 0.064 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 25, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 5, | |
| "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": 10468982784000.0, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |