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

  • Log In
  • Sign Up

rahulshetty
/
hybrid-tiny-wikitext-poc

Text Generation
Transformers
Safetensors
hybrid_tiny_lm
custom-code
hybrid-attention
state-space-model
wikitext
ml-intern
Model card Files Files and versions
xet
Community

Instructions to use rahulshetty/hybrid-tiny-wikitext-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use rahulshetty/hybrid-tiny-wikitext-poc with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="rahulshetty/hybrid-tiny-wikitext-poc")
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("rahulshetty/hybrid-tiny-wikitext-poc", dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use rahulshetty/hybrid-tiny-wikitext-poc with vLLM:

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

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

    How to use rahulshetty/hybrid-tiny-wikitext-poc with Docker Model Runner:

    docker model run hf.co/rahulshetty/hybrid-tiny-wikitext-poc
hybrid-tiny-wikitext-poc
45.2 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
rahulshetty's picture
rahulshetty
Update ML Intern artifact metadata
e4de392 verified 1 day ago
  • .gitattributes
    1.52 kB
    initial commit 1 day ago
  • README.md
    2.1 kB
    Update ML Intern artifact metadata 1 day ago
  • config.json
    534 Bytes
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • generation_config.json
    216 Bytes
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • hybrid_lm_poc.py
    17.4 kB
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • model.safetensors
    41.6 MB
    xet
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • poc_metrics.json
    244 Bytes
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • sample_generation.txt
    239 Bytes
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • tokenizer.json
    3.56 MB
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • tokenizer_config.json
    326 Bytes
    Upload hybrid LM POC trained on Wikitext-2 1 day ago
  • training_args.bin

    Detected Pickle imports (10)

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

    How to fix it?

    5.33 kB
    xet
    Upload hybrid LM POC trained on Wikitext-2 1 day ago