Text Generation
Transformers
TensorBoard
Safetensors
gpt2
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use BEGADE/model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BEGADE/model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BEGADE/model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BEGADE/model") model = AutoModelForCausalLM.from_pretrained("BEGADE/model") 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
- vLLM
How to use BEGADE/model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BEGADE/model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BEGADE/model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BEGADE/model
- SGLang
How to use BEGADE/model 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 "BEGADE/model" \ --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": "BEGADE/model", "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 "BEGADE/model" \ --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": "BEGADE/model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use BEGADE/model with Docker Model Runner:
docker model run hf.co/BEGADE/model
Model save
Browse files
README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: mit
|
| 3 |
base_model: openai-community/gpt2
|
| 4 |
tags:
|
|
@@ -45,7 +46,7 @@ The following hyperparameters were used during training:
|
|
| 45 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 46 |
- lr_scheduler_type: constant
|
| 47 |
- lr_scheduler_warmup_ratio: 0.03
|
| 48 |
-
- num_epochs:
|
| 49 |
|
| 50 |
### Training results
|
| 51 |
|
|
@@ -53,7 +54,7 @@ The following hyperparameters were used during training:
|
|
| 53 |
|
| 54 |
### Framework versions
|
| 55 |
|
| 56 |
-
- Transformers 4.
|
| 57 |
- Pytorch 2.4.0+cu121
|
| 58 |
- Datasets 2.21.0
|
| 59 |
- Tokenizers 0.19.1
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
license: mit
|
| 4 |
base_model: openai-community/gpt2
|
| 5 |
tags:
|
|
|
|
| 46 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 47 |
- lr_scheduler_type: constant
|
| 48 |
- lr_scheduler_warmup_ratio: 0.03
|
| 49 |
+
- num_epochs: 4
|
| 50 |
|
| 51 |
### Training results
|
| 52 |
|
|
|
|
| 54 |
|
| 55 |
### Framework versions
|
| 56 |
|
| 57 |
+
- Transformers 4.44.2
|
| 58 |
- Pytorch 2.4.0+cu121
|
| 59 |
- Datasets 2.21.0
|
| 60 |
- Tokenizers 0.19.1
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"bos_token_id": 50257,
|
| 4 |
"eos_token_id": 50258,
|
| 5 |
"pad_token_id": 50258,
|
| 6 |
-
"transformers_version": "4.
|
| 7 |
}
|
|
|
|
| 3 |
"bos_token_id": 50257,
|
| 4 |
"eos_token_id": 50258,
|
| 5 |
"pad_token_id": 50258,
|
| 6 |
+
"transformers_version": "4.44.2"
|
| 7 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 497780352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:682d53a9ce85279a5faae1c1ae9ca02ed0d9c74dcad753bc5e7596a52d2e95c2
|
| 3 |
size 497780352
|
runs/Sep10_01-12-14_9140fd6908f0/events.out.tfevents.1725930807.9140fd6908f0.228.1
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87367d70e6b5b90db00952c66dab52dec8d954b7b4585371ec94ad82e47b643e
|
| 3 |
+
size 13281
|