Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use adeo/smollm2-135M-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adeo/smollm2-135M-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adeo/smollm2-135M-sft") 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("adeo/smollm2-135M-sft") model = AutoModelForCausalLM.from_pretrained("adeo/smollm2-135M-sft", 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 adeo/smollm2-135M-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adeo/smollm2-135M-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adeo/smollm2-135M-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adeo/smollm2-135M-sft
- SGLang
How to use adeo/smollm2-135M-sft 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 "adeo/smollm2-135M-sft" \ --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": "adeo/smollm2-135M-sft", "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 "adeo/smollm2-135M-sft" \ --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": "adeo/smollm2-135M-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adeo/smollm2-135M-sft with Docker Model Runner:
docker model run hf.co/adeo/smollm2-135M-sft
Model save
Browse files- README.md +1 -1
- all_results.json +6 -6
- model.safetensors +1 -1
- runs/Apr21_23-18-32_gboye-System-Product-Name/events.out.tfevents.1745296340.gboye-System-Product-Name.22997.0 +3 -0
- runs/Apr21_23-59-01_gboye-System-Product-Name/events.out.tfevents.1745297972.gboye-System-Product-Name.23664.0 +3 -0
- runs/Apr22_00-00-25_gboye-System-Product-Name/events.out.tfevents.1745298029.gboye-System-Product-Name.24096.0 +3 -0
- runs/Apr22_00-01-23_gboye-System-Product-Name/events.out.tfevents.1745298088.gboye-System-Product-Name.24431.0 +3 -0
- runs/Apr22_00-02-27_gboye-System-Product-Name/events.out.tfevents.1745298150.gboye-System-Product-Name.24761.0 +3 -0
- tokenizer.json +1 -6
- train_results.json +6 -6
- trainer_state.json +0 -0
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -27,7 +27,7 @@ print(output["generated_text"])
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/bootpin/huggingface/runs/
|
| 31 |
|
| 32 |
This model was trained with SFT.
|
| 33 |
|
|
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/bootpin/huggingface/runs/ugo8ezc5)
|
| 31 |
|
| 32 |
This model was trained with SFT.
|
| 33 |
|
all_results.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"epoch": 1.
|
| 3 |
-
"total_flos":
|
| 4 |
-
"train_loss": 1.
|
| 5 |
-
"train_runtime":
|
| 6 |
"train_samples": 460142,
|
| 7 |
-
"train_samples_per_second":
|
| 8 |
-
"train_steps_per_second": 0.
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"epoch": 1.9999210266535044,
|
| 3 |
+
"total_flos": 3.966176424708014e+17,
|
| 4 |
+
"train_loss": 1.3566406987474495,
|
| 5 |
+
"train_runtime": 18822.9291,
|
| 6 |
"train_samples": 460142,
|
| 7 |
+
"train_samples_per_second": 43.052,
|
| 8 |
+
"train_steps_per_second": 0.673
|
| 9 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 269060552
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6fa831a9ab2771b8f61218365619dca935fdbb7a641b830e1a780f373ad9142f
|
| 3 |
size 269060552
|
runs/Apr21_23-18-32_gboye-System-Product-Name/events.out.tfevents.1745296340.gboye-System-Product-Name.22997.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f139286576d004b53b3df8f0fba44a5cf9267de2776c63c6eb21e87b14810f2a
|
| 3 |
+
size 17543
|
runs/Apr21_23-59-01_gboye-System-Product-Name/events.out.tfevents.1745297972.gboye-System-Product-Name.23664.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ff2bda6e25ca690c56e7774015bd53957d7b72f06662a979c27fcc1bc389da9
|
| 3 |
+
size 6034
|
runs/Apr22_00-00-25_gboye-System-Product-Name/events.out.tfevents.1745298029.gboye-System-Product-Name.24096.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6cf33dbfb950bb02a6b30009aaec4828ea38bf25e4b78a945cec7845f3d3ae8d
|
| 3 |
+
size 6034
|
runs/Apr22_00-01-23_gboye-System-Product-Name/events.out.tfevents.1745298088.gboye-System-Product-Name.24431.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c6836790173439bbc02d74f4c1bea988b937b3f96019291d58e6f10d23b87bf
|
| 3 |
+
size 6447
|
runs/Apr22_00-02-27_gboye-System-Product-Name/events.out.tfevents.1745298150.gboye-System-Product-Name.24761.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:500e8461f0c4eb7c609f2b521c5dd03f0c05a21dc976ad4741601334b5fee52b
|
| 3 |
+
size 540875
|
tokenizer.json
CHANGED
|
@@ -1,11 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
"direction": "Right",
|
| 5 |
-
"max_length": 1024,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
train_results.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"epoch": 1.
|
| 3 |
-
"total_flos":
|
| 4 |
-
"train_loss": 1.
|
| 5 |
-
"train_runtime":
|
| 6 |
"train_samples": 460142,
|
| 7 |
-
"train_samples_per_second":
|
| 8 |
-
"train_steps_per_second": 0.
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"epoch": 1.9999210266535044,
|
| 3 |
+
"total_flos": 3.966176424708014e+17,
|
| 4 |
+
"train_loss": 1.3566406987474495,
|
| 5 |
+
"train_runtime": 18822.9291,
|
| 6 |
"train_samples": 460142,
|
| 7 |
+
"train_samples_per_second": 43.052,
|
| 8 |
+
"train_steps_per_second": 0.673
|
| 9 |
}
|
trainer_state.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6968
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85375179406bca01f5322c42059c3c2c3c49d1ad7a2e4eafc59c80426433f699
|
| 3 |
size 6968
|