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

aliwister
/
ali-llm-safe

Text Generation
Transformers
Safetensors
PyTorch
English
ali
curriculum-learning
education
pretraining
custom_code
Model card Files Files and versions
xet
Community

Instructions to use aliwister/ali-llm-safe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use aliwister/ali-llm-safe with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="aliwister/ali-llm-safe", trust_remote_code=True)
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("aliwister/ali-llm-safe", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use aliwister/ali-llm-safe with vLLM:

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

    How to use aliwister/ali-llm-safe 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 "aliwister/ali-llm-safe" \
        --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": "aliwister/ali-llm-safe",
    		"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 "aliwister/ali-llm-safe" \
            --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": "aliwister/ali-llm-safe",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use aliwister/ali-llm-safe with Docker Model Runner:

    docker model run hf.co/aliwister/ali-llm-safe

You need to agree to share your Hugging Face 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.52 kB
    initial commit 22 days ago
  • README.md
    34.2 kB
    ali-llm-safe: final weights (step 27,499) 22 days ago
  • config.json
    709 Bytes
    ali-llm-safe: final weights (step 27,499) 22 days ago
  • configuration_ali.py
    1.45 kB
    ali-llm-safe: final weights (step 27,499) 22 days ago
  • generation_config.json
    90 Bytes
    ali-llm-safe: final weights (step 27,499) 22 days ago
  • model.safetensors
    4.1 GB
    xet
    ali-llm-safe: final weights (step 27,499) 22 days ago
  • modeling_ali.py
    9.18 kB
    ali-llm-safe: final weights (step 27,499) 22 days ago
  • tokenizer.json
    3.51 MB
    ali-llm-safe: final weights (step 27,499) 22 days ago
  • tokenizer_config.json
    238 Bytes
    ali-llm-safe: final weights (step 27,499) 22 days ago