Run this model with HF Jobs
Run michaelhu1/tmp_trainer 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/michaelhu1/tmp_trainer. 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/michaelhu1/tmp_trainer 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/michaelhu1/tmp_trainer. 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/michaelhu1/tmp_trainer. 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 michaelhu1/tmp_trainer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use michaelhu1/tmp_trainer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="michaelhu1/tmp_trainer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("michaelhu1/tmp_trainer") model = AutoModelForCausalLM.from_pretrained("michaelhu1/tmp_trainer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use michaelhu1/tmp_trainer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "michaelhu1/tmp_trainer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "michaelhu1/tmp_trainer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/michaelhu1/tmp_trainer
- SGLang
How to use michaelhu1/tmp_trainer 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 "michaelhu1/tmp_trainer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "michaelhu1/tmp_trainer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "michaelhu1/tmp_trainer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "michaelhu1/tmp_trainer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use michaelhu1/tmp_trainer with Docker Model Runner:
docker model run hf.co/michaelhu1/tmp_trainer
End of training
Browse filesFiles changed (10)
- README.mdAdded+54
- config.jsonAdded+25
- generation_config.jsonAdded+5
- model.safetensorsAdded+3
- runs/Feb26_12-57-36_87da7930d69b/events.out.tfevents.1708952257.87da7930d69b.6121.0Added+3
- special_tokens_map.jsonAdded+7
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+57
- training_args.binAdded+3
- vocab.txtAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354---license: mitbase_model: prajjwal1/bert-mediumtags:- trl- sft- generated_from_trainermodel-index:- name: poetryai 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. -->
# poetryai
This model is a fine-tuned version of [prajjwal1/bert-medium](https://huggingface.co/prajjwal1/bert-medium) on an unknown dataset.
## 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: 5e-05- train_batch_size: 8- eval_batch_size: 8- seed: 42- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- num_epochs: 3.0
### Training results
### Framework versions
- Transformers 4.37.2- Pytorch 2.1.0+cu121- Datasets 2.17.1- Tokenizers 0.15.212345678910111213141516171819202122232425{ "_name_or_path": "prajjwal1/bert-medium", "architectures": [ "BertLMHeadModel" ], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 512, "initializer_range": 0.02, "intermediate_size": 2048, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 8, "num_hidden_layers": 8, "pad_token_id": 0, "position_embedding_type": "absolute", "torch_dtype": "float32", "transformers_version": "4.37.2", "type_vocab_size": 2, "use_cache": true, "vocab_size": 30522}12345{ "_from_model_config": true, "pad_token_id": 0, "transformers_version": "4.37.2"}123version https://git-lfs.github.com/spec/v1oid sha256:247ee8eca242d57dcc4e69459821e251a80ef59de2babc6a0aa9b1d006af3fe1size 165634976123version https://git-lfs.github.com/spec/v1oid sha256:485e71d4b7a38303f1ae6a4258dc9df6c8d92a7fcbe5fa831af12bd9f8d64690size 89961234567{ "cls_token": "[CLS]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": "[UNK]"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657{ "added_tokens_decoder": { "0": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "101": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "102": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "103": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "clean_up_tokenization_spaces": true, "cls_token": "[CLS]", "do_basic_tokenize": true, "do_lower_case": true, "mask_token": "[MASK]", "model_max_length": 1000000000000000019884624838656, "never_split": null, "pad_token": "[PAD]", "sep_token": "[SEP]", "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]"}123version https://git-lfs.github.com/spec/v1oid sha256:5de2dc2a94838afa6905515138b407832f02ee531a3a3c9e4f1f1a7f623cd7b6size 4664README.mdAdded+54
config.jsonAdded+25
generation_config.jsonAdded+5
model.safetensorsAdded+3
runs/Feb26_12-57-36_87da7930d69b/events.out.tfevents.1708952257.87da7930d69b.6121.0Added+3
special_tokens_map.jsonAdded+7
tokenizer.jsonAdded
tokenizer_config.jsonAdded+57
training_args.binAdded+3
vocab.txtAdded