Text Generation
Transformers
Safetensors
smallm
Generated from Trainer
trl
sft
conversational
custom_code
Instructions to use Azrail/smallm_70_instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Azrail/smallm_70_instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Azrail/smallm_70_instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Azrail/smallm_70_instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Azrail/smallm_70_instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Azrail/smallm_70_instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Azrail/smallm_70_instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Azrail/smallm_70_instruct
- SGLang
How to use Azrail/smallm_70_instruct 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 "Azrail/smallm_70_instruct" \ --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": "Azrail/smallm_70_instruct", "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 "Azrail/smallm_70_instruct" \ --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": "Azrail/smallm_70_instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Azrail/smallm_70_instruct with Docker Model Runner:
docker model run hf.co/Azrail/smallm_70_instruct
Download last-checkpoint/trainer_state.json from Azrail/smallm_70_instruct: direct link, hf CLI and curl.
- Browser
- Download file 7.11 kB
-
https://huggingface.co/Azrail/smallm_70_instruct/resolve/008f540c8fac5985dbab0ef35e5dda96b58eca97/last-checkpoint/trainer_state.json
- Command line
-
hf download hf://Azrail/smallm_70_instruct@008f540c8fac5985dbab0ef35e5dda96b58eca97/last-checkpoint/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/Azrail/smallm_70_instruct/resolve/008f540c8fac5985dbab0ef35e5dda96b58eca97/last-checkpoint/trainer_state.json
7.11 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.24140740517215364, | |
| "eval_steps": 500, | |
| "global_step": 1000, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.012070370258607683, | |
| "grad_norm": 1.453125, | |
| "learning_rate": 1.5087507543753772e-06, | |
| "loss": 2.681, | |
| "mean_token_accuracy": 0.5007504414767027, | |
| "num_input_tokens_seen": 25446880, | |
| "num_tokens": 10166805.0, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.024140740517215365, | |
| "grad_norm": 1.4921875, | |
| "learning_rate": 3.0175015087507544e-06, | |
| "loss": 2.6838, | |
| "mean_token_accuracy": 0.500230128839612, | |
| "num_input_tokens_seen": 51020960, | |
| "num_tokens": 20365412.0, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.03621111077582305, | |
| "grad_norm": 1.6484375, | |
| "learning_rate": 4.526252263126131e-06, | |
| "loss": 2.6811, | |
| "mean_token_accuracy": 0.5007199160754681, | |
| "num_input_tokens_seen": 76507776, | |
| "num_tokens": 30424121.0, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.04828148103443073, | |
| "grad_norm": 1.4765625, | |
| "learning_rate": 6.035003017501509e-06, | |
| "loss": 2.6797, | |
| "mean_token_accuracy": 0.500353229418397, | |
| "num_input_tokens_seen": 101977920, | |
| "num_tokens": 40650709.0, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.06035185129303841, | |
| "grad_norm": 1.421875, | |
| "learning_rate": 7.543753771876886e-06, | |
| "loss": 2.6464, | |
| "mean_token_accuracy": 0.5040991773456335, | |
| "num_input_tokens_seen": 127536896, | |
| "num_tokens": 50830609.0, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.0724222215516461, | |
| "grad_norm": 1.140625, | |
| "learning_rate": 9.052504526252262e-06, | |
| "loss": 2.654, | |
| "mean_token_accuracy": 0.5034311909228564, | |
| "num_input_tokens_seen": 153048544, | |
| "num_tokens": 60898431.0, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.08449259181025377, | |
| "grad_norm": 1.0234375, | |
| "learning_rate": 1.0561255280627642e-05, | |
| "loss": 2.625, | |
| "mean_token_accuracy": 0.5059863431751728, | |
| "num_input_tokens_seen": 178595392, | |
| "num_tokens": 71195944.0, | |
| "step": 350 | |
| }, | |
| { | |
| "epoch": 0.09656296206886146, | |
| "grad_norm": 0.91015625, | |
| "learning_rate": 1.2070006035003018e-05, | |
| "loss": 2.6079, | |
| "mean_token_accuracy": 0.5077864757180214, | |
| "num_input_tokens_seen": 204085184, | |
| "num_tokens": 81381172.0, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 0.10863333232746915, | |
| "grad_norm": 0.78515625, | |
| "learning_rate": 1.3578756789378394e-05, | |
| "loss": 2.6083, | |
| "mean_token_accuracy": 0.5078243865072727, | |
| "num_input_tokens_seen": 229609824, | |
| "num_tokens": 91569720.0, | |
| "step": 450 | |
| }, | |
| { | |
| "epoch": 0.12070370258607682, | |
| "grad_norm": 0.734375, | |
| "learning_rate": 1.5087507543753773e-05, | |
| "loss": 2.591, | |
| "num_input_tokens_seen": 255055520, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.12070370258607682, | |
| "eval_loss": 2.492645263671875, | |
| "eval_mean_token_accuracy": 0.5286665781386491, | |
| "eval_num_tokens": 101801812.0, | |
| "eval_runtime": 126.4646, | |
| "eval_samples_per_second": 84.704, | |
| "eval_steps_per_second": 21.176, | |
| "num_input_tokens_seen": 255055520, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.1327740728446845, | |
| "grad_norm": 0.70703125, | |
| "learning_rate": 1.659625829812915e-05, | |
| "loss": 2.5826, | |
| "mean_token_accuracy": 0.5089771485328675, | |
| "num_input_tokens_seen": 280435680, | |
| "num_tokens": 111840270.0, | |
| "step": 550 | |
| }, | |
| { | |
| "epoch": 0.1448444431032922, | |
| "grad_norm": 0.65625, | |
| "learning_rate": 1.8105009052504525e-05, | |
| "loss": 2.5689, | |
| "mean_token_accuracy": 0.5112711164355278, | |
| "num_input_tokens_seen": 305931936, | |
| "num_tokens": 121987982.0, | |
| "step": 600 | |
| }, | |
| { | |
| "epoch": 0.15691481336189989, | |
| "grad_norm": 0.75, | |
| "learning_rate": 1.9613759806879906e-05, | |
| "loss": 2.55, | |
| "mean_token_accuracy": 0.5135074812173843, | |
| "num_input_tokens_seen": 331404160, | |
| "num_tokens": 132144416.0, | |
| "step": 650 | |
| }, | |
| { | |
| "epoch": 0.16898518362050755, | |
| "grad_norm": 0.58984375, | |
| "learning_rate": 2.1122510561255283e-05, | |
| "loss": 2.5497, | |
| "mean_token_accuracy": 0.513639942780137, | |
| "num_input_tokens_seen": 356956832, | |
| "num_tokens": 142378323.0, | |
| "step": 700 | |
| }, | |
| { | |
| "epoch": 0.18105555387911523, | |
| "grad_norm": 0.486328125, | |
| "learning_rate": 2.2631261315630658e-05, | |
| "loss": 2.5395, | |
| "mean_token_accuracy": 0.5144028599560261, | |
| "num_input_tokens_seen": 382529376, | |
| "num_tokens": 152623392.0, | |
| "step": 750 | |
| }, | |
| { | |
| "epoch": 0.19312592413772292, | |
| "grad_norm": 0.5234375, | |
| "learning_rate": 2.4140012070006035e-05, | |
| "loss": 2.5309, | |
| "mean_token_accuracy": 0.5156180351227522, | |
| "num_input_tokens_seen": 408021056, | |
| "num_tokens": 162827766.0, | |
| "step": 800 | |
| }, | |
| { | |
| "epoch": 0.2051962943963306, | |
| "grad_norm": 0.447265625, | |
| "learning_rate": 2.5648762824381413e-05, | |
| "loss": 2.5241, | |
| "mean_token_accuracy": 0.5165234027802944, | |
| "num_input_tokens_seen": 433622464, | |
| "num_tokens": 172979899.0, | |
| "step": 850 | |
| }, | |
| { | |
| "epoch": 0.2172666646549383, | |
| "grad_norm": 0.55078125, | |
| "learning_rate": 2.7157513578756787e-05, | |
| "loss": 2.5219, | |
| "mean_token_accuracy": 0.5160751658678054, | |
| "num_input_tokens_seen": 459074080, | |
| "num_tokens": 183138615.0, | |
| "step": 900 | |
| }, | |
| { | |
| "epoch": 0.22933703491354598, | |
| "grad_norm": 0.482421875, | |
| "learning_rate": 2.866626433313217e-05, | |
| "loss": 2.511, | |
| "mean_token_accuracy": 0.5176014001667499, | |
| "num_input_tokens_seen": 484598624, | |
| "num_tokens": 193253896.0, | |
| "step": 950 | |
| }, | |
| { | |
| "epoch": 0.24140740517215364, | |
| "grad_norm": 0.6015625, | |
| "learning_rate": 3.0175015087507546e-05, | |
| "loss": 2.4857, | |
| "num_input_tokens_seen": 510077440, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 0.24140740517215364, | |
| "eval_loss": 2.4022138118743896, | |
| "eval_mean_token_accuracy": 0.5380484161312853, | |
| "eval_num_tokens": 203431197.0, | |
| "eval_runtime": 126.7655, | |
| "eval_samples_per_second": 84.503, | |
| "eval_steps_per_second": 21.126, | |
| "num_input_tokens_seen": 510077440, | |
| "step": 1000 | |
| } | |
| ], | |
| "logging_steps": 50, | |
| "max_steps": 8284, | |
| "num_input_tokens_seen": 510077440, | |
| "num_train_epochs": 2, | |
| "save_steps": 1000, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 1.364506935558144e+17, | |
| "train_batch_size": 32, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |