Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
text-generation-inference
Instructions to use WilliamHH/Assignment2-modified-V4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WilliamHH/Assignment2-modified-V4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WilliamHH/Assignment2-modified-V4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WilliamHH/Assignment2-modified-V4") model = AutoModelForCausalLM.from_pretrained("WilliamHH/Assignment2-modified-V4") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use WilliamHH/Assignment2-modified-V4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WilliamHH/Assignment2-modified-V4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WilliamHH/Assignment2-modified-V4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WilliamHH/Assignment2-modified-V4
- SGLang
How to use WilliamHH/Assignment2-modified-V4 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 "WilliamHH/Assignment2-modified-V4" \ --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": "WilliamHH/Assignment2-modified-V4", "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 "WilliamHH/Assignment2-modified-V4" \ --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": "WilliamHH/Assignment2-modified-V4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WilliamHH/Assignment2-modified-V4 with Docker Model Runner:
docker model run hf.co/WilliamHH/Assignment2-modified-V4
Assignment2-modified-V4
This model is a fine-tuned version of HuggingFaceTB/SmolLM-135M on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 2.8664
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: 4e-05
- train_batch_size: 8
- eval_batch_size: 8
- 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
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.5124 | 0.1067 | 200 | 3.1406 |
| 2.646 | 0.2133 | 400 | 3.0470 |
| 2.4984 | 0.32 | 600 | 2.9933 |
| 2.4831 | 0.4267 | 800 | 2.9577 |
| 2.4422 | 0.5333 | 1000 | 2.9183 |
| 2.3946 | 0.64 | 1200 | 2.8964 |
| 2.3091 | 0.7467 | 1400 | 2.8777 |
| 2.3445 | 0.8533 | 1600 | 2.8548 |
| 2.3067 | 0.96 | 1800 | 2.8339 |
| 2.1795 | 1.0667 | 2000 | 2.8570 |
| 1.9869 | 1.1733 | 2200 | 2.8557 |
| 1.9955 | 1.28 | 2400 | 2.8516 |
| 2.0386 | 1.3867 | 2600 | 2.8442 |
| 1.9987 | 1.4933 | 2800 | 2.8436 |
| 2.0111 | 1.6 | 3000 | 2.8368 |
| 1.9452 | 1.7067 | 3200 | 2.8283 |
| 1.9509 | 1.8133 | 3400 | 2.8191 |
| 1.9163 | 1.92 | 3600 | 2.8148 |
| 1.9621 | 2.0267 | 3800 | 2.8338 |
| 1.786 | 2.1333 | 4000 | 2.8653 |
| 1.7842 | 2.24 | 4200 | 2.8693 |
| 1.8084 | 2.3467 | 4400 | 2.8705 |
| 1.7057 | 2.4533 | 4600 | 2.8779 |
| 1.8589 | 2.56 | 4800 | 2.8660 |
| 1.7983 | 2.6667 | 5000 | 2.8655 |
| 1.7421 | 2.7733 | 5200 | 2.8659 |
| 1.7648 | 2.88 | 5400 | 2.8664 |
| 1.8171 | 2.9867 | 5600 | 2.8664 |
Framework versions
- Transformers 4.57.1
- Pytorch 2.8.0+cu126
- Datasets 4.0.0
- Tokenizers 0.22.1
- Downloads last month
- 12
Model tree for WilliamHH/Assignment2-modified-V4
Base model
HuggingFaceTB/SmolLM-135M