Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
conversational
text-generation-inference
Run this model with HF Jobs
Run lewtun/dummy-model 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/lewtun/dummy-model. 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/lewtun/dummy-model 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/lewtun/dummy-model. 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/lewtun/dummy-model. 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 lewtun/dummy-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lewtun/dummy-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lewtun/dummy-model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lewtun/dummy-model") model = AutoModelForCausalLM.from_pretrained("lewtun/dummy-model", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lewtun/dummy-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lewtun/dummy-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lewtun/dummy-model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lewtun/dummy-model
- SGLang
How to use lewtun/dummy-model 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 "lewtun/dummy-model" \ --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": "lewtun/dummy-model", "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 "lewtun/dummy-model" \ --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": "lewtun/dummy-model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lewtun/dummy-model with Docker Model Runner:
docker model run hf.co/lewtun/dummy-model
End of training
Browse filesFiles changed (14)
- README.mdAdded+54
- added_tokens.jsonAdded+5
- all_results.jsonAdded+7
- config.jsonAdded+28
- generation_config.jsonAdded+11
- merges.txtAdded
- model.safetensorsAdded+3
- special_tokens_map.jsonAdded+20
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+44
- train_results.jsonAdded+7
- trainer_state.jsonAdded+44
- training_args.binAdded+3
- vocab.jsonAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354---license: otherbase_model: Qwen/Qwen1.5-0.5B-Chattags:- generated_from_trainermodel-index:- name: dummy-model 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. -->
# dummy-model
This model is a fine-tuned version of [Qwen/Qwen1.5-0.5B-Chat](https://huggingface.co/Qwen/Qwen1.5-0.5B-Chat) on the None 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-07- train_batch_size: 8- eval_batch_size: 8- seed: 42- distributed_type: multi-GPU- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- lr_scheduler_warmup_ratio: 0.1- training_steps: 1
### Training results
### Framework versions
- Transformers 4.37.2- Pytorch 2.1.2+cu121- Datasets 2.16.1- Tokenizers 0.15.012345{ "<|endoftext|>": 151643, "<|im_end|>": 151645, "<|im_start|>": 151644}1234567{ "epoch": 0.0, "train_loss": 0.6931471824645996, "train_runtime": 5.7081, "train_samples_per_second": 1.402, "train_steps_per_second": 0.175}12345678910111213141516171819202122232425262728{ "_name_or_path": "Qwen/Qwen1.5-0.5B-Chat", "architectures": [ "Qwen2ForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 151643, "eos_token_id": 151645, "hidden_act": "silu", "hidden_size": 1024, "initializer_range": 0.02, "intermediate_size": 2816, "max_position_embeddings": 32768, "max_window_layers": 21, "model_type": "qwen2", "num_attention_heads": 16, "num_hidden_layers": 24, "num_key_value_heads": 16, "rms_norm_eps": 1e-06, "rope_theta": 1000000.0, "sliding_window": 32768, "tie_word_embeddings": true, "torch_dtype": "bfloat16", "transformers_version": "4.37.2", "use_cache": false, "use_sliding_window": false, "vocab_size": 151936}1234567891011{ "bos_token_id": 151643, "do_sample": true, "eos_token_id": [ 151645, 151643 ], "repetition_penalty": 1.1, "top_p": 0.8, "transformers_version": "4.37.2"}123version https://git-lfs.github.com/spec/v1oid sha256:2ae33e290572bff9d1123269a1d8344f47b1b46c2ce43e057553a7a6da3f2ebcsize 9280081041234567891011121314151617181920{ "additional_special_tokens": [ "<|im_start|>", "<|im_end|>" ], "eos_token": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}1234567891011121314151617181920212223242526272829303132333435363738394041424344{ "add_prefix_space": false, "added_tokens_decoder": { "151643": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151644": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151645": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [ "<|im_start|>", "<|im_end|>" ], "bos_token": null, "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content']}}{% if (loop.last and add_generation_prompt) or not loop.last %}{{ '<|im_end|>' + '\n'}}{% endif %}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] != 'assistant' %}{{ '<|im_start|>assistant\n' }}{% endif %}", "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "model_max_length": 32768, "pad_token": "<|endoftext|>", "split_special_tokens": false, "tokenizer_class": "Qwen2Tokenizer", "truncation_side": "left", "unk_token": null}1234567{ "epoch": 0.0, "train_loss": 0.6931471824645996, "train_runtime": 5.7081, "train_samples_per_second": 1.402, "train_steps_per_second": 0.175}1234567891011121314151617181920212223242526272829303132333435363738394041424344{ "best_metric": null, "best_model_checkpoint": null, "epoch": 0.00016066838046272492, "eval_steps": 500, "global_step": 1, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.0, "learning_rate": 0.0, "logits/generated": -1.85471510887146, "logits/real": -1.7835122346878052, "logps/generated": -667.4280395507812, "logps/real": -384.09954833984375, "loss": 0.6931, "rewards/accuracies": 0.0, "rewards/generated": 0.0, "rewards/margins": 0.0, "rewards/real": 0.0, "step": 1 }, { "epoch": 0.0, "step": 1, "total_flos": 0.0, "train_loss": 0.6931471824645996, "train_runtime": 5.7081, "train_samples_per_second": 1.402, "train_steps_per_second": 0.175 } ], "logging_steps": 10, "max_steps": 1, "num_input_tokens_seen": 0, "num_train_epochs": 1, "save_steps": 500, "total_flos": 0.0, "train_batch_size": 8, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:97d70fd13f56bf2bc31dec85745526536ea6e683f284e8155499eedf2c7a011csize 5880README.mdAdded+54
added_tokens.jsonAdded+5
all_results.jsonAdded+7
config.jsonAdded+28
generation_config.jsonAdded+11
merges.txtAdded
model.safetensorsAdded+3
special_tokens_map.jsonAdded+20
tokenizer.jsonAdded
tokenizer_config.jsonAdded+44
train_results.jsonAdded+7
trainer_state.jsonAdded+44
training_args.binAdded+3
vocab.jsonAdded