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

  • Log In
  • Sign Up

NoesisLab
/
Spartacus-1B-Instruct

Text Generation
Transformers
Safetensors
English
monoid
causal-lm
linear-attention
state-space
O(1)-inference
vector-decay
reasoning
conversational
custom_code
Model card Files Files and versions
xet
Community
2

Instructions to use NoesisLab/Spartacus-1B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use NoesisLab/Spartacus-1B-Instruct with Transformers:

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

    How to use NoesisLab/Spartacus-1B-Instruct with vLLM:

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

    How to use NoesisLab/Spartacus-1B-Instruct 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 "NoesisLab/Spartacus-1B-Instruct" \
        --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": "NoesisLab/Spartacus-1B-Instruct",
    		"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 "NoesisLab/Spartacus-1B-Instruct" \
            --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": "NoesisLab/Spartacus-1B-Instruct",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use NoesisLab/Spartacus-1B-Instruct with Docker Model Runner:

    docker model run hf.co/NoesisLab/Spartacus-1B-Instruct
Spartacus-1B-Instruct
Ctrl+K
Ctrl+K
  • 1 contributor
History: 11 commits
OzTianlu's picture
OzTianlu
Update README.md
9d0ba4a verified 2 months ago
  • .gitattributes
    1.62 kB
    Upload 14 files 2 months ago
  • ACC_SPAR.png
    63.1 kB
    Upload 14 files 2 months ago
  • ARCH.png
    441 kB
    xet
    Upload ARCH.png 2 months ago
  • LOSS_SPAR.png
    61.3 kB
    Upload 14 files 2 months ago
  • MonoidForCausalLM.py
    45 kB
    Upload 14 files 2 months ago
  • README.md
    8.69 kB
    Update README.md 2 months ago
  • chat_template.jinja
    3.83 kB
    Upload 11 files 3 months ago
  • config.json
    706 Bytes
    Upload 14 files 2 months ago
  • generation_config.json
    157 Bytes
    Upload 11 files 3 months ago
  • model.safetensors
    2.95 GB
    xet
    Upload 14 files 2 months ago
  • monoid_scan_cuda.py
    19.3 kB
    Upload 14 files 2 months ago
  • special_tokens_map.json
    439 Bytes
    Upload 11 files 3 months ago
  • tokenizer.json
    17.2 MB
    xet
    Upload 11 files 3 months ago
  • tokenizer_config.json
    50.6 kB
    Upload 11 files 3 months ago
  • training_args.bin

    Detected Pickle imports (10)

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

    How to fix it?

    6.35 kB
    xet
    Upload 14 files 2 months ago