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

  • Log In
  • Sign Up

TNSA
/
NGen2-15M

Text Generation
Transformers
Safetensors
English
Hindi
Telugu
ngen3
Model card Files Files and versions
xet
Community

Instructions to use TNSA/NGen2-15M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use TNSA/NGen2-15M with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="TNSA/NGen2-15M")
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("TNSA/NGen2-15M", dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use TNSA/NGen2-15M with vLLM:

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

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

    How to use TNSA/NGen2-15M with Docker Model Runner:

    docker model run hf.co/TNSA/NGen2-15M

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Gated model
You can list files but not access them

Preview of files found in this repository
  • .gitattributes
    1.57 kB
    Rename pytorch_model.safetensors to model.saftensors about 1 year ago
  • LICENCE
    3.89 kB
    Upload 8 files over 1 year ago
  • README.md
    4.57 kB
    Update README.md 12 months ago
  • added_tokens.json
    24 Bytes
    Upload 10 files over 1 year ago
  • config.json
    695 Bytes
    Create config.json over 1 year ago
  • data-00000-of-00001.arrow
    280 MB
    xet
    Upload 10 files over 1 year ago
  • dataset_info.json
    1.98 kB
    Upload 10 files over 1 year ago
  • deepspeed.json
    750 Bytes
    Upload 8 files over 1 year ago
  • merges.txt
    456 kB
    Upload 10 files over 1 year ago
  • model.safetensors
    56.3 MB
    xet
    Rename model.saftensors to model.safetensors about 1 year ago
  • prepare.py
    2.57 kB
    Upload 8 files over 1 year ago
  • special_tokens_map.json
    249 Bytes
    Upload 10 files over 1 year ago
  • state.json
    262 Bytes
    Upload 10 files over 1 year ago
  • tokenizer.json
    2.11 MB
    Upload 10 files over 1 year ago
  • tokenizer_config.json
    667 Bytes
    Upload 10 files over 1 year ago
  • vocab.json
    798 kB
    Upload 10 files over 1 year ago