Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

qgyd2021
/
similar_question_generation

Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Model card Files Files and versions
xet
Metrics Training metrics Community

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
818 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 9 commits
qgyd2021's picture
qgyd2021
Model save
5b8b57a verified over 2 years ago
  • final
    Model save over 2 years ago
  • runs
    Model save over 2 years ago
  • .gitattributes
    1.52 kB
    initial commit over 2 years ago
  • README.md
    2.22 kB
    Model save over 2 years ago
  • config.json
    1.03 kB
    Training in progress, step 5000 over 2 years ago
  • generation_config.json
    119 Bytes
    Model save over 2 years ago
  • model.safetensors
    408 MB
    xet
    Model save over 2 years ago
  • special_tokens_map.json
    125 Bytes
    Training in progress, step 5000 over 2 years ago
  • tokenizer.json
    439 kB
    Training in progress, step 5000 over 2 years ago
  • tokenizer_config.json
    1.24 kB
    Training in progress, step 5000 over 2 years ago
  • training_args.bin

    Detected Pickle imports (8)

    • "transformers.training_args.TrainingArguments",
    • "transformers.training_args.OptimizerNames",
    • "transformers.trainer_utils.SchedulerType",
    • "accelerate.state.PartialState",
    • "torch.device",
    • "transformers.trainer_utils.HubStrategy",
    • "accelerate.utils.dataclasses.DistributedType",
    • "transformers.trainer_utils.IntervalStrategy"

    How to fix it?

    4.28 kB
    xet
    Training in progress, step 5000 over 2 years ago
  • vocab.txt
    110 kB
    Training in progress, step 5000 over 2 years ago