Text Generation
Transformers
Safetensors
llama
smol-course
module_1
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use GenAI09/SmolLM2-FT-MyDataset with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GenAI09/SmolLM2-FT-MyDataset with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GenAI09/SmolLM2-FT-MyDataset") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GenAI09/SmolLM2-FT-MyDataset") model = AutoModelForCausalLM.from_pretrained("GenAI09/SmolLM2-FT-MyDataset") 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
- vLLM
How to use GenAI09/SmolLM2-FT-MyDataset with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GenAI09/SmolLM2-FT-MyDataset" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GenAI09/SmolLM2-FT-MyDataset", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GenAI09/SmolLM2-FT-MyDataset
- SGLang
How to use GenAI09/SmolLM2-FT-MyDataset 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 "GenAI09/SmolLM2-FT-MyDataset" \ --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": "GenAI09/SmolLM2-FT-MyDataset", "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 "GenAI09/SmolLM2-FT-MyDataset" \ --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": "GenAI09/SmolLM2-FT-MyDataset", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GenAI09/SmolLM2-FT-MyDataset with Docker Model Runner:
docker model run hf.co/GenAI09/SmolLM2-FT-MyDataset
End of training
Browse files- README.md +28 -0
- model.safetensors +1 -1
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -19,6 +19,8 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 19 |
# SmolLM2-FT-MyDataset
|
| 20 |
|
| 21 |
This model is a fine-tuned version of [HuggingFaceTB/SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M) on an unknown dataset.
|
|
|
|
|
|
|
| 22 |
|
| 23 |
## Model description
|
| 24 |
|
|
@@ -45,6 +47,32 @@ The following hyperparameters were used during training:
|
|
| 45 |
- lr_scheduler_type: linear
|
| 46 |
- training_steps: 1000
|
| 47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
### Framework versions
|
| 49 |
|
| 50 |
- Transformers 4.44.2
|
|
|
|
| 19 |
# SmolLM2-FT-MyDataset
|
| 20 |
|
| 21 |
This model is a fine-tuned version of [HuggingFaceTB/SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M) on an unknown dataset.
|
| 22 |
+
It achieves the following results on the evaluation set:
|
| 23 |
+
- Loss: 1.0215
|
| 24 |
|
| 25 |
## Model description
|
| 26 |
|
|
|
|
| 47 |
- lr_scheduler_type: linear
|
| 48 |
- training_steps: 1000
|
| 49 |
|
| 50 |
+
### Training results
|
| 51 |
+
|
| 52 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 53 |
+
|:-------------:|:------:|:----:|:---------------:|
|
| 54 |
+
| 1.1027 | 0.0885 | 50 | 1.1590 |
|
| 55 |
+
| 1.0992 | 0.1770 | 100 | 1.1241 |
|
| 56 |
+
| 1.0405 | 0.2655 | 150 | 1.0955 |
|
| 57 |
+
| 1.0568 | 0.3540 | 200 | 1.0797 |
|
| 58 |
+
| 1.0566 | 0.4425 | 250 | 1.0705 |
|
| 59 |
+
| 1.0573 | 0.5310 | 300 | 1.0615 |
|
| 60 |
+
| 1.0583 | 0.6195 | 350 | 1.0548 |
|
| 61 |
+
| 0.9828 | 0.7080 | 400 | 1.0508 |
|
| 62 |
+
| 1.0235 | 0.7965 | 450 | 1.0426 |
|
| 63 |
+
| 1.0522 | 0.8850 | 500 | 1.0337 |
|
| 64 |
+
| 1.0021 | 0.9735 | 550 | 1.0283 |
|
| 65 |
+
| 0.7676 | 1.0619 | 600 | 1.0331 |
|
| 66 |
+
| 0.8208 | 1.1504 | 650 | 1.0299 |
|
| 67 |
+
| 0.8139 | 1.2389 | 700 | 1.0311 |
|
| 68 |
+
| 0.8332 | 1.3274 | 750 | 1.0285 |
|
| 69 |
+
| 0.8405 | 1.4159 | 800 | 1.0249 |
|
| 70 |
+
| 0.7773 | 1.5044 | 850 | 1.0253 |
|
| 71 |
+
| 0.8224 | 1.5929 | 900 | 1.0228 |
|
| 72 |
+
| 0.8139 | 1.6814 | 950 | 1.0217 |
|
| 73 |
+
| 0.8032 | 1.7699 | 1000 | 1.0215 |
|
| 74 |
+
|
| 75 |
+
|
| 76 |
### Framework versions
|
| 77 |
|
| 78 |
- Transformers 4.44.2
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 538090408
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbf2be0e533bd520d1515ea30a93d5f7f577b5c7e77859d4c7e777f793d56377
|
| 3 |
size 538090408
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5841
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cac94b8fd624a2156b514596933e6443a01788909f285a6ae563166120c04169
|
| 3 |
size 5841
|