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

  • Log In
  • Sign Up

CharlesLi
/
OpenELM-1_1B-SimPO

Text Generation
Transformers
TensorBoard
Safetensors
openelm
trl
cpo
alignment-handbook
Generated from Trainer
conversational
custom_code
Model card Files Files and versions
xet
Metrics Training metrics Community

Instructions to use CharlesLi/OpenELM-1_1B-SimPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use CharlesLi/OpenELM-1_1B-SimPO with Transformers:

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

    How to use CharlesLi/OpenELM-1_1B-SimPO with vLLM:

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

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

    How to use CharlesLi/OpenELM-1_1B-SimPO with Docker Model Runner:

    docker model run hf.co/CharlesLi/OpenELM-1_1B-SimPO
OpenELM-1_1B-SimPO
2.16 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 6 commits
CharlesLi's picture
CharlesLi
Model save
a51a83d verified over 1 year ago
  • runs
    Model save over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    7.59 kB
    Model save over 1 year ago
  • all_results.json
    709 Bytes
    Model save over 1 year ago
  • config.json
    1.66 kB
    Training in progress, epoch 0 over 1 year ago
  • configuration_openelm.py
    14.3 kB
    Model save over 1 year ago
  • eval_results.json
    520 Bytes
    Model save over 1 year ago
  • generation_config.json
    111 Bytes
    Model save over 1 year ago
  • model.safetensors
    2.16 GB
    xet
    Training in progress, epoch 2 over 1 year ago
  • modeling_openelm.py
    39.3 kB
    Model save over 1 year ago
  • special_tokens_map.json
    437 Bytes
    Training in progress, epoch 0 over 1 year ago
  • tokenizer.json
    1.84 MB
    Training in progress, epoch 0 over 1 year ago
  • tokenizer.model
    500 kB
    xet
    Training in progress, epoch 0 over 1 year ago
  • tokenizer_config.json
    1.37 kB
    Training in progress, epoch 0 over 1 year ago
  • train_results.json
    223 Bytes
    Model save over 1 year ago
  • trainer_state.json
    154 kB
    Model save over 1 year ago
  • training_args.bin
    7.1 kB
    xet
    Model save over 1 year ago