Text Generation
Transformers
Safetensors
smallm
Generated from Trainer
trl
sft
conversational
custom_code
Run this model with HF Jobs
Run Azrail/smallm_70_instruct 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/Azrail/smallm_70_instruct. 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/Azrail/smallm_70_instruct 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/Azrail/smallm_70_instruct. 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/Azrail/smallm_70_instruct. 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 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
Training in progress, step 1000, checkpoint
Browse filesFiles changed (11)
- last-checkpoint/config.jsonAdded+52
- last-checkpoint/generation_config.jsonAdded+7
- last-checkpoint/model.safetensorsAdded+3
- last-checkpoint/optimizer.ptAdded+3
- last-checkpoint/rng_state.pthAdded+3
- last-checkpoint/scheduler.ptAdded+3
- last-checkpoint/special_tokens_map.jsonAdded+27
- last-checkpoint/tokenizer.jsonAdded
- last-checkpoint/tokenizer_config.jsonAdded+120
- last-checkpoint/trainer_state.jsonAdded+252
- last-checkpoint/training_args.binAdded+3
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152{ "architectures": [ "SmalLmForCausalLM" ], "attention_bias": false, "attention_dropout": 0.1, "auto_map": { "AutoConfig": "Azrail/smallm_70--config.SmalLmConfig", "AutoModelForCausalLM": "Azrail/smallm_70--model.SmalLmForCausalLM" }, "balancing_coef": 0.0001, "bos_token_id": 1, "embedding_dropout": 0.0, "eos_token_id": 0, "expert_size": 576, "gate_noise": false, "head_size": 64, "hidden_size": 512, "high_rotations": 32, "initializer_range": 0.02, "intermediate_size": 1024, "layer_dropout": 0.1, "low_rotations": 1, "max_seq_len": 2048, "mlp_bias": false, "model_type": "smallm", "moe_bias": false, "moe_period": 2, "no_moe_layers": 10, "noisy_experts": false, "num_attention_heads": 8, "num_hidden_layers": 20, "num_kv_heads": 2, "original_seq_len": 1024, "pad_token_id": 0, "positional_bias_type": "rope", "rms_affine": false, "rms_norm_eps": 1e-06, "rope_base": 100000, "routed_experts": 8, "shared_experts": 1, "sliding_window_attention": true, "sliding_window_context": 1024, "sliding_window_period": 4, "static_residual": false, "token_experts": 3, "torch_dtype": "bfloat16", "transformers_version": "4.50.3", "use_cache": true, "use_moe": false, "vocab_size": 60000}1234567{ "do_sample": true, "max_new_tokens": 100, "repetition_penalty": 1.2, "top_p": 0.8, "transformers_version": "4.50.3"}123version https://git-lfs.github.com/spec/v1oid sha256:3f3c22936a0095ac18daff8e6dcf0e5a3c013ec81937d069c3fc7ec2ce742258size 150625560123version https://git-lfs.github.com/spec/v1oid sha256:ede7891a612e5bdf9d9f3ea5ba8ce2d972ac251ac865d5a7ca14b4f136bc03dbsize 602335994123version https://git-lfs.github.com/spec/v1oid sha256:521f432674dde45244a4689a033d9db107314cdff516b6bf8384096ef5f6c190size 14244123version https://git-lfs.github.com/spec/v1oid sha256:e1c35f90edf203b2f0483c8d4d666d73bb8fd60a06a785c4abd30a947f264d74size 1064123456789101112131415161718192021222324252627{ "additional_special_tokens": [ "<|im_start|>", "<|im_end|>" ], "bos_token": { "content": "<|beginoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120{ "added_tokens_decoder": { "0": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<|beginoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "4": { "content": "<|reserved_token_3|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "5": { "content": "<|reserved_token_4|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "6": { "content": "<|reserved_token_5|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "7": { "content": "<|reserved_token_6|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "8": { "content": "<|reserved_token_7|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "9": { "content": "<|reserved_token_8|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "10": { "content": "<|reserved_token_9|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "11": { "content": "<|reserved_token_10|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "12": { "content": "<|reserved_token_11|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [ "<|im_start|>", "<|im_end|>" ], "bos_token": "<|beginoftext|>", "chat_template": "{% for message in messages %}{% if message.get('role') is not none %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% else %}{{message['content'] + '<|im_end|>' + '\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}", "clean_up_tokenization_spaces": false, "eos_token": "<|endoftext|>", "extra_special_tokens": {}, "model_max_length": 1000000000000000019884624838656, "pad_token": "<|endoftext|>", "tokenizer_class": "PreTrainedTokenizer"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252{ "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}123version https://git-lfs.github.com/spec/v1oid sha256:02b13fc8d7c893a956ab01c588fd523c765a348a70de0153e06e4429d50ed8eesize 5752last-checkpoint/config.jsonAdded+52
last-checkpoint/generation_config.jsonAdded+7
last-checkpoint/model.safetensorsAdded+3
last-checkpoint/optimizer.ptAdded+3
last-checkpoint/rng_state.pthAdded+3
last-checkpoint/scheduler.ptAdded+3
last-checkpoint/special_tokens_map.jsonAdded+27
last-checkpoint/tokenizer.jsonAdded
last-checkpoint/tokenizer_config.jsonAdded+120
last-checkpoint/trainer_state.jsonAdded+252
last-checkpoint/training_args.binAdded+3