Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use qgyd2021/similar_question_generation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qgyd2021/similar_question_generation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="qgyd2021/similar_question_generation")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("qgyd2021/similar_question_generation") model = AutoModelForCausalLM.from_pretrained("qgyd2021/similar_question_generation") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use qgyd2021/similar_question_generation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qgyd2021/similar_question_generation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qgyd2021/similar_question_generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/qgyd2021/similar_question_generation
- SGLang
How to use qgyd2021/similar_question_generation 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 "qgyd2021/similar_question_generation" \ --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": "qgyd2021/similar_question_generation", "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 "qgyd2021/similar_question_generation" \ --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": "qgyd2021/similar_question_generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use qgyd2021/similar_question_generation with Docker Model Runner:
docker model run hf.co/qgyd2021/similar_question_generation
similar_question_generation
This model is a fine-tuned version of uer/gpt2-chinese-cluecorpussmall on the None dataset. It achieves the following results on the evaluation set:
- Loss: 2.0045
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- distributed_type: multi-GPU
- num_devices: 2
- gradient_accumulation_steps: 4
- total_train_batch_size: 128
- total_eval_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 1000
- num_epochs: 100.0
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.2108 | 0.21 | 1000 | 2.0433 |
| 2.047 | 0.42 | 2000 | 2.0138 |
| 1.9859 | 0.63 | 3000 | 1.9939 |
| 1.9471 | 0.84 | 4000 | 1.9953 |
| 1.8932 | 1.05 | 5000 | 2.0034 |
| 1.8224 | 1.26 | 6000 | 1.9962 |
| 1.8131 | 1.47 | 7000 | 1.9886 |
| 1.8007 | 1.69 | 8000 | 1.9881 |
| 1.7948 | 1.9 | 9000 | 1.9825 |
| 1.7314 | 2.11 | 10000 | 2.0049 |
| 1.6901 | 2.32 | 11000 | 2.0029 |
| 1.6941 | 2.53 | 12000 | 2.0012 |
| 1.6921 | 2.74 | 13000 | 2.0024 |
| 1.6917 | 2.95 | 14000 | 2.0045 |
Framework versions
- Transformers 4.36.2
- Pytorch 2.0.0
- Datasets 2.1.0
- Tokenizers 0.15.0
- Downloads last month
- 7
Model tree for qgyd2021/similar_question_generation
Base model
uer/gpt2-chinese-cluecorpussmall