Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
alignment-handbook
trl
sft
conversational
text-generation-inference
Instructions to use yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k") model = AutoModelForCausalLM.from_pretrained("yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k
- SGLang
How to use yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k 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 "yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k" \ --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": "yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k", "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 "yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k" \ --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": "yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k with Docker Model Runner:
docker model run hf.co/yeok/qwen-2.5-1.5B-instruct-sft-lora-countdown-search-5k
End of training
Browse files- README.md +5 -3
- all_results.json +5 -0
- config.json +29 -0
- eval_results.json +7 -0
README.md
CHANGED
|
@@ -1,17 +1,19 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
-
model_name:
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
- sft
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Model Card for
|
| 13 |
|
| 14 |
-
This model is a fine-tuned version of [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 3 |
+
datasets: MelinaLaimon/stream-of-search
|
| 4 |
library_name: transformers
|
| 5 |
+
model_name: Qwen/Qwen2.5-1.5B-Instruct
|
| 6 |
tags:
|
| 7 |
- generated_from_trainer
|
| 8 |
+
- alignment-handbook
|
| 9 |
- trl
|
| 10 |
- sft
|
| 11 |
licence: license
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Model Card for Qwen/Qwen2.5-1.5B-Instruct
|
| 15 |
|
| 16 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) on the [MelinaLaimon/stream-of-search](https://huggingface.co/datasets/MelinaLaimon/stream-of-search) dataset.
|
| 17 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 18 |
|
| 19 |
## Quick start
|
all_results.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"total_flos": 2.4518665439700582e+17,
|
| 3 |
"train_loss": 0.05413007871165959,
|
| 4 |
"train_runtime": 8945.5939,
|
|
|
|
| 1 |
{
|
| 2 |
+
"eval_loss": 0.04217606037855148,
|
| 3 |
+
"eval_runtime": 980.4186,
|
| 4 |
+
"eval_samples": 2000,
|
| 5 |
+
"eval_samples_per_second": 3.163,
|
| 6 |
+
"eval_steps_per_second": 1.582,
|
| 7 |
"total_flos": 2.4518665439700582e+17,
|
| 8 |
"train_loss": 0.05413007871165959,
|
| 9 |
"train_runtime": 8945.5939,
|
config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Qwen2ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 151643,
|
| 8 |
+
"eos_token_id": 151645,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 1536,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 8960,
|
| 13 |
+
"max_position_embeddings": 32768,
|
| 14 |
+
"max_window_layers": 21,
|
| 15 |
+
"model_type": "qwen2",
|
| 16 |
+
"num_attention_heads": 12,
|
| 17 |
+
"num_hidden_layers": 28,
|
| 18 |
+
"num_key_value_heads": 2,
|
| 19 |
+
"rms_norm_eps": 1e-06,
|
| 20 |
+
"rope_scaling": null,
|
| 21 |
+
"rope_theta": 1000000.0,
|
| 22 |
+
"sliding_window": 32768,
|
| 23 |
+
"tie_word_embeddings": true,
|
| 24 |
+
"torch_dtype": "bfloat16",
|
| 25 |
+
"transformers_version": "4.50.0",
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"use_sliding_window": false,
|
| 28 |
+
"vocab_size": 151936
|
| 29 |
+
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"eval_loss": 0.04217606037855148,
|
| 3 |
+
"eval_runtime": 980.4186,
|
| 4 |
+
"eval_samples": 2000,
|
| 5 |
+
"eval_samples_per_second": 3.163,
|
| 6 |
+
"eval_steps_per_second": 1.582
|
| 7 |
+
}
|