Instructions to use amanneo/mail-generator-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amanneo/mail-generator-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amanneo/mail-generator-mini")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amanneo/mail-generator-mini") model = AutoModelForCausalLM.from_pretrained("amanneo/mail-generator-mini") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amanneo/mail-generator-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amanneo/mail-generator-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amanneo/mail-generator-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/amanneo/mail-generator-mini
- SGLang
How to use amanneo/mail-generator-mini 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 "amanneo/mail-generator-mini" \ --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": "amanneo/mail-generator-mini", "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 "amanneo/mail-generator-mini" \ --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": "amanneo/mail-generator-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use amanneo/mail-generator-mini with Docker Model Runner:
docker model run hf.co/amanneo/mail-generator-mini
Training in progress epoch 0
Browse files- README.md +7 -16
- config.json +1 -1
- tf_model.h5 +1 -1
README.md
CHANGED
|
@@ -14,11 +14,11 @@ probably proofread and complete it, then remove this comment. -->
|
|
| 14 |
|
| 15 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
-
- Train Loss:
|
| 18 |
-
- Train Accuracy: 0.
|
| 19 |
-
- Validation Loss:
|
| 20 |
-
- Validation Accuracy: 0.
|
| 21 |
-
- Epoch:
|
| 22 |
|
| 23 |
## Model description
|
| 24 |
|
|
@@ -37,23 +37,14 @@ More information needed
|
|
| 37 |
### Training hyperparameters
|
| 38 |
|
| 39 |
The following hyperparameters were used during training:
|
| 40 |
-
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'class_name': 'WarmUp', 'config': {'initial_learning_rate': 5e-05, 'decay_schedule_fn': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 125, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, '__passive_serialization__': True}, 'warmup_steps': 1000, 'power': 1.0, 'name': None}}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
|
| 41 |
- training_precision: mixed_float16
|
| 42 |
|
| 43 |
### Training results
|
| 44 |
|
| 45 |
| Train Loss | Train Accuracy | Validation Loss | Validation Accuracy | Epoch |
|
| 46 |
|:----------:|:--------------:|:---------------:|:-------------------:|:-----:|
|
| 47 |
-
|
|
| 48 |
-
| 3.8960 | 0.0449 | 4.3546 | 0.0447 | 1 |
|
| 49 |
-
| 3.8963 | 0.0451 | 4.3546 | 0.0447 | 2 |
|
| 50 |
-
| 3.8952 | 0.0451 | 4.3546 | 0.0447 | 3 |
|
| 51 |
-
| 3.8945 | 0.0451 | 4.3546 | 0.0447 | 4 |
|
| 52 |
-
| 3.8949 | 0.0451 | 4.3546 | 0.0447 | 5 |
|
| 53 |
-
| 3.8939 | 0.0451 | 4.3546 | 0.0447 | 6 |
|
| 54 |
-
| 3.8947 | 0.0449 | 4.3546 | 0.0447 | 7 |
|
| 55 |
-
| 3.8942 | 0.0449 | 4.3546 | 0.0447 | 8 |
|
| 56 |
-
| 3.8951 | 0.0451 | 4.3546 | 0.0447 | 9 |
|
| 57 |
|
| 58 |
|
| 59 |
### Framework versions
|
|
|
|
| 14 |
|
| 15 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
+
- Train Loss: 7.1912
|
| 18 |
+
- Train Accuracy: 0.0424
|
| 19 |
+
- Validation Loss: 5.8111
|
| 20 |
+
- Validation Accuracy: 0.0344
|
| 21 |
+
- Epoch: 0
|
| 22 |
|
| 23 |
## Model description
|
| 24 |
|
|
|
|
| 37 |
### Training hyperparameters
|
| 38 |
|
| 39 |
The following hyperparameters were used during training:
|
| 40 |
+
- optimizer: {'inner_optimizer': {'class_name': 'AdamWeightDecay', 'config': {'name': 'AdamWeightDecay', 'learning_rate': {'class_name': 'WarmUp', 'config': {'initial_learning_rate': 5e-05, 'decay_schedule_fn': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 125, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, '__passive_serialization__': True}, 'warmup_steps': 1000, 'power': 1.0, 'name': None}}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}}, 'dynamic': True, 'initial_scale': 32768.0, 'dynamic_growth_steps': 2000}
|
| 41 |
- training_precision: mixed_float16
|
| 42 |
|
| 43 |
### Training results
|
| 44 |
|
| 45 |
| Train Loss | Train Accuracy | Validation Loss | Validation Accuracy | Epoch |
|
| 46 |
|:----------:|:--------------:|:---------------:|:-------------------:|:-----:|
|
| 47 |
+
| 7.1912 | 0.0424 | 5.8111 | 0.0344 | 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
### Framework versions
|
config.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"layer_norm_epsilon": 1e-05,
|
| 13 |
"model_type": "gpt2",
|
| 14 |
-
"n_ctx":
|
| 15 |
"n_embd": 768,
|
| 16 |
"n_head": 12,
|
| 17 |
"n_inner": null,
|
|
|
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"layer_norm_epsilon": 1e-05,
|
| 13 |
"model_type": "gpt2",
|
| 14 |
+
"n_ctx": 40,
|
| 15 |
"n_embd": 768,
|
| 16 |
"n_head": 12,
|
| 17 |
"n_inner": null,
|
tf_model.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 497935464
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c8c55918c00a2537479d975a796b3a9f3f16d75c340275277e7780e327e9d47
|
| 3 |
size 497935464
|