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

  • Log In
  • Sign Up

ijktech
/
ByteGPT-small

Text Generation
Transformers
ONNX
Safetensors
English
ijk_byte_gpt
gpt
byte-tokenization
mobile
embedded
custom_code
Model card Files Files and versions
xet
Community

Instructions to use ijktech/ByteGPT-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use ijktech/ByteGPT-small with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="ijktech/ByteGPT-small", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("ijktech/ByteGPT-small", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use ijktech/ByteGPT-small with vLLM:

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

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

    How to use ijktech/ByteGPT-small with Docker Model Runner:

    docker model run hf.co/ijktech/ByteGPT-small
ByteGPT-small
786 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 20 commits
ijktech-jk's picture
ijktech-jk
Delete model_quantized.onnx
89cf38a verified about 1 year ago
  • .gitattributes
    1.57 kB
    Add Quantized Mobile Model about 1 year ago
  • LICENSE.txt
    333 Bytes
    Add company license about 1 year ago
  • README.md
    5.25 kB
    Update README with Android SDK Details about 1 year ago
  • added_tokens.json
    3.02 kB
    Upload ByteGPT tokenizer about 1 year ago
  • config.json
    437 Bytes
    Upload ByteGPT-small about 1 year ago
  • configuration_bytegpt.py
    896 Bytes
    Upload ByteGPT-small about 1 year ago
  • generation_config.json
    69 Bytes
    Upload ByteGPT-small about 1 year ago
  • logo.png
    59 kB
    Add company logo about 1 year ago
  • model.onnx
    349 MB
    xet
    Add ONNX model about 1 year ago
  • model.safetensors
    345 MB
    xet
    Upload ByteGPT-small about 1 year ago
  • model_mobile.ort
    92.1 MB
    xet
    Add Quantized Mobile Model about 1 year ago
  • modeling_bytegpt.py
    11.8 kB
    Upload ByteGPT-small about 1 year ago
  • special_tokens_map.json
    2.86 kB
    Upload ByteGPT tokenizer about 1 year ago
  • tokenizer_config.json
    25.6 kB
    Upload ByteGPT tokenizer about 1 year ago