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

  • Log In
  • Sign Up

theaicompany02
/
Shivik-Code-1B

Text Generation
Transformers
Safetensors
English
shivik_code
code
causal-lm
shivik
conversational
custom_code
Model card Files Files and versions
xet
Community

Instructions to use theaicompany02/Shivik-Code-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use theaicompany02/Shivik-Code-1B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="theaicompany02/Shivik-Code-1B", trust_remote_code=True)
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("theaicompany02/Shivik-Code-1B", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use theaicompany02/Shivik-Code-1B with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "theaicompany02/Shivik-Code-1B"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "theaicompany02/Shivik-Code-1B",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/theaicompany02/Shivik-Code-1B
  • SGLang

    How to use theaicompany02/Shivik-Code-1B 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 "theaicompany02/Shivik-Code-1B" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "theaicompany02/Shivik-Code-1B",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    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 "theaicompany02/Shivik-Code-1B" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "theaicompany02/Shivik-Code-1B",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use theaicompany02/Shivik-Code-1B with Docker Model Runner:

    docker model run hf.co/theaicompany02/Shivik-Code-1B
Shivik-Code-1B
2.49 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
theaicompany02's picture
theaicompany02
Initial release: Shivik-Code-1B
ee7c543 verified 4 months ago
  • .ipynb_checkpoints
    Initial release: Shivik-Code-1B 4 months ago
  • .gitattributes
    1.57 kB
    Initial release: Shivik-Code-1B 4 months ago
  • README.md
    580 Bytes
    Initial release: Shivik-Code-1B 4 months ago
  • chat_template.jinja
    3.83 kB
    Initial release: Shivik-Code-1B 4 months ago
  • config.json
    2.79 kB
    Initial release: Shivik-Code-1B 4 months ago
  • configuration_shivik_code.py
    2.87 kB
    Initial release: Shivik-Code-1B 4 months ago
  • model.safetensors
    2.47 GB
    xet
    Initial release: Shivik-Code-1B 4 months ago
  • modeling_shivik_code.py
    5.22 kB
    Initial release: Shivik-Code-1B 4 months ago
  • modeling_shivik_m4_original.py
    459 Bytes
    Initial release: Shivik-Code-1B 4 months ago
  • special_tokens_map.json
    3.68 kB
    Initial release: Shivik-Code-1B 4 months ago
  • special_tokens_map_extended.json
    1.89 kB
    Initial release: Shivik-Code-1B 4 months ago
  • tokenizer.json
    17.2 MB
    xet
    Initial release: Shivik-Code-1B 4 months ago
  • tokenizer_config.json
    55.1 kB
    Initial release: Shivik-Code-1B 4 months ago