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

  • Log In
  • Sign Up

johaanm
/
modelllamatest

Text Generation
Transformers
Safetensors
llama
text-generation-inference
4-bit precision
bitsandbytes
Model card Files Files and versions
xet
Community

Instructions to use johaanm/modelllamatest with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use johaanm/modelllamatest with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="johaanm/modelllamatest")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("johaanm/modelllamatest")
    model = AutoModelForCausalLM.from_pretrained("johaanm/modelllamatest")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use johaanm/modelllamatest with vLLM:

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

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

    How to use johaanm/modelllamatest with Docker Model Runner:

    docker model run hf.co/johaanm/modelllamatest
modelllamatest
5.71 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 10 commits
johaanm's picture
johaanm
Rename tokenizer_config (3).json to tokenizer_config.json
9da9448 verified almost 2 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 2 years ago
  • config.json
    1.14 kB
    Rename config (4).json to config.json almost 2 years ago
  • generation_config.json
    172 Bytes
    Rename generation_config (2).json to generation_config.json almost 2 years ago
  • model-00001-of-00002.safetensors
    4.65 GB
    xet
    Rename model-00001-of-00002-001.safetensors to model-00001-of-00002.safetensors almost 2 years ago
  • model-00002-of-00002.safetensors
    1.05 GB
    xet
    Upload 2 files almost 2 years ago
  • model.safetensors.index.json
    132 kB
    Rename model.safetensors.index (2).json to model.safetensors.index.json almost 2 years ago
  • special_tokens_map.json
    464 Bytes
    Rename special_tokens_map (2).json to special_tokens_map.json almost 2 years ago
  • tokenizer.json
    9.09 MB
    Rename tokenizer (2).json to tokenizer.json almost 2 years ago
  • tokenizer_config.json
    50.6 kB
    Rename tokenizer_config (3).json to tokenizer_config.json almost 2 years ago