Text Generation
Transformers
Safetensors
mistral
alignment-handbook
Generated from Trainer
trl
kto
conversational
text-generation-inference
Instructions to use DatPySci/zephyr-7b-kto-iter0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DatPySci/zephyr-7b-kto-iter0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DatPySci/zephyr-7b-kto-iter0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DatPySci/zephyr-7b-kto-iter0") model = AutoModelForCausalLM.from_pretrained("DatPySci/zephyr-7b-kto-iter0", 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 DatPySci/zephyr-7b-kto-iter0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DatPySci/zephyr-7b-kto-iter0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DatPySci/zephyr-7b-kto-iter0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DatPySci/zephyr-7b-kto-iter0
- SGLang
How to use DatPySci/zephyr-7b-kto-iter0 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 "DatPySci/zephyr-7b-kto-iter0" \ --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": "DatPySci/zephyr-7b-kto-iter0", "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 "DatPySci/zephyr-7b-kto-iter0" \ --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": "DatPySci/zephyr-7b-kto-iter0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DatPySci/zephyr-7b-kto-iter0 with Docker Model Runner:
docker model run hf.co/DatPySci/zephyr-7b-kto-iter0
End of training
Browse files- README.md +3 -3
- all_results.json +3 -3
- config.json +1 -1
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
- train_results.json +3 -3
- trainer_state.json +0 -0
README.md
CHANGED
|
@@ -39,12 +39,12 @@ More information needed
|
|
| 39 |
The following hyperparameters were used during training:
|
| 40 |
- learning_rate: 5e-07
|
| 41 |
- train_batch_size: 8
|
| 42 |
-
- eval_batch_size:
|
| 43 |
- seed: 42
|
| 44 |
- distributed_type: multi-GPU
|
| 45 |
- num_devices: 8
|
| 46 |
- total_train_batch_size: 64
|
| 47 |
-
- total_eval_batch_size:
|
| 48 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 49 |
- lr_scheduler_type: linear
|
| 50 |
- lr_scheduler_warmup_ratio: 0.1
|
|
@@ -58,5 +58,5 @@ The following hyperparameters were used during training:
|
|
| 58 |
|
| 59 |
- Transformers 4.39.3
|
| 60 |
- Pytorch 2.1.2+cu121
|
| 61 |
-
- Datasets 2.
|
| 62 |
- Tokenizers 0.15.2
|
|
|
|
| 39 |
The following hyperparameters were used during training:
|
| 40 |
- learning_rate: 5e-07
|
| 41 |
- train_batch_size: 8
|
| 42 |
+
- eval_batch_size: 4
|
| 43 |
- seed: 42
|
| 44 |
- distributed_type: multi-GPU
|
| 45 |
- num_devices: 8
|
| 46 |
- total_train_batch_size: 64
|
| 47 |
+
- total_eval_batch_size: 32
|
| 48 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 49 |
- lr_scheduler_type: linear
|
| 50 |
- lr_scheduler_warmup_ratio: 0.1
|
|
|
|
| 58 |
|
| 59 |
- Transformers 4.39.3
|
| 60 |
- Pytorch 2.1.2+cu121
|
| 61 |
+
- Datasets 2.18.0
|
| 62 |
- Tokenizers 0.15.2
|
all_results.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
-
"train_loss": 0.
|
| 4 |
-
"train_runtime":
|
| 5 |
-
"train_samples_per_second": 9.
|
| 6 |
"train_steps_per_second": 0.141
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
+
"train_loss": 0.1710020688315347,
|
| 4 |
+
"train_runtime": 11106.5263,
|
| 5 |
+
"train_samples_per_second": 9.004,
|
| 6 |
"train_steps_per_second": 0.141
|
| 7 |
}
|
config.json
CHANGED
|
@@ -21,6 +21,6 @@
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.39.3",
|
| 24 |
-
"use_cache":
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|
|
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.39.3",
|
| 24 |
+
"use_cache": true,
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4943162336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c045ac89a939e151ad8f6cd36201494b0b674084b03f4009da02b9c641f400a
|
| 3 |
size 4943162336
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999819336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:589c45c2cffbd77aeba04b60f13111b384b3def14875dc4a23190a04e2117792
|
| 3 |
size 4999819336
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4540516344
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b2148cb02b65d16e8a261007fb4fe98d397f65aa464a0cd2170dc9fd321872a
|
| 3 |
size 4540516344
|
train_results.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
-
"train_loss": 0.
|
| 4 |
-
"train_runtime":
|
| 5 |
-
"train_samples_per_second": 9.
|
| 6 |
"train_steps_per_second": 0.141
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
+
"train_loss": 0.1710020688315347,
|
| 4 |
+
"train_runtime": 11106.5263,
|
| 5 |
+
"train_samples_per_second": 9.004,
|
| 6 |
"train_steps_per_second": 0.141
|
| 7 |
}
|
trainer_state.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|