Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

q-project
/
N-Q-26M

Text Generation
Transformers
Safetensors
Russian
English
nq4
causal-lm
custom-architecture
gated-deltanet
linear-attention
exact-circuits
tiny-model
base-model
russian
conversational
custom_code
Model card Files Files and versions
xet
Community

Instructions to use q-project/N-Q-26M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use q-project/N-Q-26M with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="q-project/N-Q-26M", trust_remote_code=True)
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("q-project/N-Q-26M", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use q-project/N-Q-26M with vLLM:

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

    How to use q-project/N-Q-26M 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 "q-project/N-Q-26M" \
        --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": "q-project/N-Q-26M",
    		"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 "q-project/N-Q-26M" \
            --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": "q-project/N-Q-26M",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use q-project/N-Q-26M with Docker Model Runner:

    docker model run hf.co/q-project/N-Q-26M
N-Q-26M
280 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 4 commits
LakoMoor's picture
LakoMoor
generate(): do_sample=False means greedy (HF convention)
5341345 verified 3 days ago
  • .gitattributes
    1.57 kB
    N-Q-26M: initial private release 3 days ago
  • LICENSE
    11.4 kB
    N-Q-26M: initial private release 3 days ago
  • NOTICE
    81 Bytes
    N-Q-26M: initial private release 3 days ago
  • Q_Logo.svg
    2.17 kB
    N-Q-26M: initial private release 3 days ago
  • README.md
    5.58 kB
    N-Q-26M: initial private release 3 days ago
  • chat_template.jinja
    391 Bytes
    N-Q-26M: initial private release 3 days ago
  • circuits.py
    7.93 kB
    N-Q-26M: initial private release 3 days ago
  • config.json
    1.54 kB
    N-Q-26M: initial private release 3 days ago
  • generation_config.json
    133 Bytes
    N-Q-26M: initial private release 3 days ago
  • model.qpack
    93.7 MB
    xet
    N-Q-26M: initial private release 3 days ago
  • model.safetensors
    186 MB
    xet
    N-Q-26M: initial private release 3 days ago
  • modeling_nq4.py
    43.2 kB
    generate(): do_sample=False means greedy (HF convention) 3 days ago
  • qpack.py
    9.22 kB
    qpack.py: guard self-import for remote-code import check 3 days ago
  • tokenizer.json
    716 kB
    N-Q-26M: initial private release 3 days ago
  • tokenizer_config.json
    145 Bytes
    N-Q-26M: initial private release 3 days ago