Text Generation
Transformers
Safetensors
llama
Generated from Trainer
conversational
text-generation-inference
Instructions to use mazesmazes/tiny-turn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mazesmazes/tiny-turn with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mazesmazes/tiny-turn") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mazesmazes/tiny-turn") model = AutoModelForCausalLM.from_pretrained("mazesmazes/tiny-turn") 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 Settings
- vLLM
How to use mazesmazes/tiny-turn with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mazesmazes/tiny-turn" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mazesmazes/tiny-turn", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mazesmazes/tiny-turn
- SGLang
How to use mazesmazes/tiny-turn 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 "mazesmazes/tiny-turn" \ --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": "mazesmazes/tiny-turn", "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 "mazesmazes/tiny-turn" \ --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": "mazesmazes/tiny-turn", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mazesmazes/tiny-turn with Docker Model Runner:
docker model run hf.co/mazesmazes/tiny-turn
| library_name: transformers | |
| license: apache-2.0 | |
| base_model: HuggingFaceTB/SmolLM2-135M-Instruct | |
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: tiny-turn | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # tiny-turn | |
| This model is a fine-tuned version of [HuggingFaceTB/SmolLM2-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 1.5122 | |
| ## 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: 64 | |
| - eval_batch_size: 64 | |
| - seed: 42 | |
| - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments | |
| - lr_scheduler_type: cosine | |
| - lr_scheduler_warmup_steps: 500 | |
| - num_epochs: 10 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | | |
| |:-------------:|:------:|:-----:|:---------------:| | |
| | 1.5988 | 0.4819 | 1000 | 1.6036 | | |
| | 1.5668 | 0.9639 | 2000 | 1.5508 | | |
| | 1.5337 | 1.4458 | 3000 | 1.5326 | | |
| | 1.5210 | 1.9277 | 4000 | 1.5227 | | |
| | 1.5078 | 2.4096 | 5000 | 1.5176 | | |
| | 1.5247 | 2.8916 | 6000 | 1.5157 | | |
| | 1.5034 | 3.3735 | 7000 | 1.5140 | | |
| | 1.5273 | 3.8554 | 8000 | 1.5137 | | |
| | 1.5209 | 4.3373 | 9000 | 1.5127 | | |
| | 1.5108 | 4.8193 | 10000 | 1.5123 | | |
| | 1.5134 | 5.3012 | 11000 | 1.5123 | | |
| | 1.5131 | 5.7831 | 12000 | 1.5124 | | |
| | 1.5197 | 6.2651 | 13000 | 1.5122 | | |
| | 1.5254 | 6.7470 | 14000 | 1.5122 | | |
| | 1.5139 | 7.2289 | 15000 | 1.5120 | | |
| | 1.5068 | 7.7108 | 16000 | 1.5122 | | |
| | 1.5128 | 8.1928 | 17000 | 1.5121 | | |
| | 1.5168 | 8.6747 | 18000 | 1.5122 | | |
| ### Framework versions | |
| - Transformers 5.5.4 | |
| - Pytorch 2.8.0+cu128 | |
| - Datasets 3.6.0 | |
| - Tokenizers 0.22.2 | |