Text Generation
Transformers
Safetensors
mistral
axolotl
Generated from Trainer
conversational
text-generation-inference
Instructions to use SystemAdmin123/tiny-random-mistral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SystemAdmin123/tiny-random-mistral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SystemAdmin123/tiny-random-mistral") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SystemAdmin123/tiny-random-mistral") model = AutoModelForCausalLM.from_pretrained("SystemAdmin123/tiny-random-mistral") 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
- vLLM
How to use SystemAdmin123/tiny-random-mistral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SystemAdmin123/tiny-random-mistral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SystemAdmin123/tiny-random-mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SystemAdmin123/tiny-random-mistral
- SGLang
How to use SystemAdmin123/tiny-random-mistral 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 "SystemAdmin123/tiny-random-mistral" \ --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": "SystemAdmin123/tiny-random-mistral", "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 "SystemAdmin123/tiny-random-mistral" \ --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": "SystemAdmin123/tiny-random-mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SystemAdmin123/tiny-random-mistral with Docker Model Runner:
docker model run hf.co/SystemAdmin123/tiny-random-mistral
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 16.666666666666668, | |
| "eval_steps": 20, | |
| "global_step": 100, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.16666666666666666, | |
| "eval_loss": 10.376465797424316, | |
| "eval_runtime": 2.3401, | |
| "eval_samples_per_second": 641.435, | |
| "eval_steps_per_second": 5.128, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 1.6666666666666665, | |
| "grad_norm": 0.25, | |
| "learning_rate": 0.00019863613034027224, | |
| "loss": 10.3694, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 3.3333333333333335, | |
| "grad_norm": 0.5078125, | |
| "learning_rate": 0.0001879473751206489, | |
| "loss": 10.3174, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 3.3333333333333335, | |
| "eval_loss": 10.268799781799316, | |
| "eval_runtime": 2.3183, | |
| "eval_samples_per_second": 647.45, | |
| "eval_steps_per_second": 5.176, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "grad_norm": 0.48828125, | |
| "learning_rate": 0.00016772815716257412, | |
| "loss": 10.2208, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 6.666666666666667, | |
| "grad_norm": 0.47265625, | |
| "learning_rate": 0.00014016954246529696, | |
| "loss": 10.1253, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 6.666666666666667, | |
| "eval_loss": 10.083762168884277, | |
| "eval_runtime": 2.3148, | |
| "eval_samples_per_second": 648.43, | |
| "eval_steps_per_second": 5.184, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 8.333333333333334, | |
| "grad_norm": 0.474609375, | |
| "learning_rate": 0.00010825793454723325, | |
| "loss": 10.0488, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 10.0, | |
| "grad_norm": 0.4765625, | |
| "learning_rate": 7.54514512859201e-05, | |
| "loss": 9.991, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 10.0, | |
| "eval_loss": 9.97324275970459, | |
| "eval_runtime": 2.331, | |
| "eval_samples_per_second": 643.921, | |
| "eval_steps_per_second": 5.148, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 11.666666666666666, | |
| "grad_norm": 0.48046875, | |
| "learning_rate": 4.530518418775733e-05, | |
| "loss": 9.9538, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 13.333333333333334, | |
| "grad_norm": 0.4765625, | |
| "learning_rate": 2.1085949060360654e-05, | |
| "loss": 9.9348, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 13.333333333333334, | |
| "eval_loss": 9.937129974365234, | |
| "eval_runtime": 2.3322, | |
| "eval_samples_per_second": 643.602, | |
| "eval_steps_per_second": 5.145, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 15.0, | |
| "grad_norm": 0.478515625, | |
| "learning_rate": 5.418275829936537e-06, | |
| "loss": 9.9292, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 16.666666666666668, | |
| "grad_norm": 0.4765625, | |
| "learning_rate": 0.0, | |
| "loss": 9.9287, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 16.666666666666668, | |
| "eval_loss": 9.93550968170166, | |
| "eval_runtime": 2.3635, | |
| "eval_samples_per_second": 635.065, | |
| "eval_steps_per_second": 5.077, | |
| "step": 100 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 100, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 17, | |
| "save_steps": 20, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 163170169651200.0, | |
| "train_batch_size": 32, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |