Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
llama
Generated from Trainer
text-generation-inference
Instructions to use flytech/devchat-llama-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flytech/devchat-llama-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flytech/devchat-llama-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flytech/devchat-llama-7b") model = AutoModelForCausalLM.from_pretrained("flytech/devchat-llama-7b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use flytech/devchat-llama-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flytech/devchat-llama-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flytech/devchat-llama-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/flytech/devchat-llama-7b
- SGLang
How to use flytech/devchat-llama-7b 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 "flytech/devchat-llama-7b" \ --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": "flytech/devchat-llama-7b", "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 "flytech/devchat-llama-7b" \ --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": "flytech/devchat-llama-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use flytech/devchat-llama-7b with Docker Model Runner:
docker model run hf.co/flytech/devchat-llama-7b
sirr commited on
Commit ·
000c0de
1
Parent(s): fd03e8a
Model save
Browse files
README.md
CHANGED
|
@@ -32,14 +32,16 @@ More information needed
|
|
| 32 |
### Training hyperparameters
|
| 33 |
|
| 34 |
The following hyperparameters were used during training:
|
| 35 |
-
- learning_rate:
|
| 36 |
-
- train_batch_size:
|
| 37 |
-
- eval_batch_size:
|
| 38 |
- seed: 42
|
|
|
|
|
|
|
| 39 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 40 |
- lr_scheduler_type: constant
|
| 41 |
- lr_scheduler_warmup_ratio: 0.1
|
| 42 |
-
-
|
| 43 |
|
| 44 |
### Training results
|
| 45 |
|
|
|
|
| 32 |
### Training hyperparameters
|
| 33 |
|
| 34 |
The following hyperparameters were used during training:
|
| 35 |
+
- learning_rate: 0.0001
|
| 36 |
+
- train_batch_size: 8
|
| 37 |
+
- eval_batch_size: 12
|
| 38 |
- seed: 42
|
| 39 |
+
- gradient_accumulation_steps: 2
|
| 40 |
+
- total_train_batch_size: 16
|
| 41 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 42 |
- lr_scheduler_type: constant
|
| 43 |
- lr_scheduler_warmup_ratio: 0.1
|
| 44 |
+
- num_epochs: 2
|
| 45 |
|
| 46 |
### Training results
|
| 47 |
|
events.out.tfevents.1694186175.ef7f542c87ff.437745.0
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:288e4a5c34ef363954ba5803511ce204b5d298740e1ee819781060b782c4e96d
|
| 3 |
+
size 3219
|