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

  • Log In
  • Sign Up

Roman190928
/
MicroGPT

Text Generation
Transformers
PyTorch
Safetensors
English
gpt2
idk
english
text
langauge
speaking
text-generation-inference
Model card Files Files and versions
xet
Community
2

Instructions to use Roman190928/MicroGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Roman190928/MicroGPT with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="Roman190928/MicroGPT")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("Roman190928/MicroGPT")
    model = AutoModelForCausalLM.from_pretrained("Roman190928/MicroGPT")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use Roman190928/MicroGPT with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "Roman190928/MicroGPT"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Roman190928/MicroGPT",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/Roman190928/MicroGPT
  • SGLang

    How to use Roman190928/MicroGPT 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 "Roman190928/MicroGPT" \
        --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": "Roman190928/MicroGPT",
    		"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 "Roman190928/MicroGPT" \
            --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": "Roman190928/MicroGPT",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use Roman190928/MicroGPT with Docker Model Runner:

    docker model run hf.co/Roman190928/MicroGPT
MicroGPT
800 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 15 commits
Roman190928's picture
Roman190928
Update README.md
d513d3c verified 5 months ago
  • .gitattributes
    1.52 kB
    initial commit 5 months ago
  • README.md
    1.1 kB
    Update README.md 5 months ago
  • added_tokens.json
    23 Bytes
    Upload 6 files 5 months ago
  • config.json
    760 Bytes
    Upload 3 files 5 months ago
  • infering.zip

    Pickle imports

    • No problematic imports detected

    What is a pickle import?

    192 MB
    xet
    Upload infering.zip 5 months ago
  • merges.txt
    456 kB
    Upload 6 files 5 months ago
  • model.safetensors
    206 MB
    xet
    Adding `safetensors` variant of this model (#1) 5 months ago
  • model.zip

    Pickle imports

    • No problematic imports detected

    What is a pickle import?

    191 MB
    xet
    Upload 3 files 5 months ago
  • pytorch_model.bin
    206 MB
    xet
    Rename model.bin to pytorch_model.bin 5 months ago
  • special_tokens_map.json
    239 Bytes
    Upload 6 files 5 months ago
  • tokenizer.json
    3.56 MB
    Upload 6 files 5 months ago
  • tokenizer.zip

    Pickle imports

    • No problematic imports detected

    What is a pickle import?

    1.17 MB
    xet
    Upload 3 files 5 months ago
  • tokenizer_config.json
    674 Bytes
    Upload 6 files 5 months ago
  • vocab.json
    798 kB
    Upload 6 files 5 months ago