Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
trl
sft
text-generation-inference
8-bit precision
bitsandbytes
Instructions to use Alan-Shih/homework_1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alan-Shih/homework_1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Alan-Shih/homework_1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Alan-Shih/homework_1") model = AutoModelForCausalLM.from_pretrained("Alan-Shih/homework_1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Alan-Shih/homework_1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Alan-Shih/homework_1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alan-Shih/homework_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Alan-Shih/homework_1
- SGLang
How to use Alan-Shih/homework_1 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 "Alan-Shih/homework_1" \ --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": "Alan-Shih/homework_1", "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 "Alan-Shih/homework_1" \ --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": "Alan-Shih/homework_1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Alan-Shih/homework_1 with Docker Model Runner:
docker model run hf.co/Alan-Shih/homework_1
End of training
Browse files
README.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: distilbert-base-uncased
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
metrics:
|
| 7 |
+
- matthews_correlation
|
| 8 |
+
model-index:
|
| 9 |
+
- name: homework_1
|
| 10 |
+
results: []
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 14 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 15 |
+
|
| 16 |
+
# homework_1
|
| 17 |
+
|
| 18 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset.
|
| 19 |
+
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 0.8327
|
| 21 |
+
- Matthews Correlation: 0.5298
|
| 22 |
+
|
| 23 |
+
## Model description
|
| 24 |
+
|
| 25 |
+
More information needed
|
| 26 |
+
|
| 27 |
+
## Intended uses & limitations
|
| 28 |
+
|
| 29 |
+
More information needed
|
| 30 |
+
|
| 31 |
+
## Training and evaluation data
|
| 32 |
+
|
| 33 |
+
More information needed
|
| 34 |
+
|
| 35 |
+
## Training procedure
|
| 36 |
+
|
| 37 |
+
### Training hyperparameters
|
| 38 |
+
|
| 39 |
+
The following hyperparameters were used during training:
|
| 40 |
+
- learning_rate: 2e-05
|
| 41 |
+
- train_batch_size: 16
|
| 42 |
+
- eval_batch_size: 16
|
| 43 |
+
- seed: 42
|
| 44 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 45 |
+
- lr_scheduler_type: linear
|
| 46 |
+
- num_epochs: 5
|
| 47 |
+
|
| 48 |
+
### Training results
|
| 49 |
+
|
| 50 |
+
| Training Loss | Epoch | Step | Validation Loss | Matthews Correlation |
|
| 51 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------------------:|
|
| 52 |
+
| 0.5156 | 1.0 | 535 | 0.4525 | 0.4464 |
|
| 53 |
+
| 0.342 | 2.0 | 1070 | 0.4731 | 0.5198 |
|
| 54 |
+
| 0.2309 | 3.0 | 1605 | 0.6647 | 0.5153 |
|
| 55 |
+
| 0.1705 | 4.0 | 2140 | 0.7939 | 0.5166 |
|
| 56 |
+
| 0.1268 | 5.0 | 2675 | 0.8327 | 0.5298 |
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
### Framework versions
|
| 60 |
+
|
| 61 |
+
- Transformers 4.39.1
|
| 62 |
+
- Pytorch 2.2.1+cu121
|
| 63 |
+
- Datasets 2.18.0
|
| 64 |
+
- Tokenizers 0.15.2
|
runs/Mar23_02-09-13_2ed998b56e2c/events.out.tfevents.1711160272.2ed998b56e2c.195.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76e773688bee4ecd6221eb7fae3932822f0c04ae3b63c3dba101ee6d5b41a89c
|
| 3 |
+
size 423
|