Instructions to use JackFram/llama-68m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JackFram/llama-68m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JackFram/llama-68m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JackFram/llama-68m") model = AutoModelForCausalLM.from_pretrained("JackFram/llama-68m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use JackFram/llama-68m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JackFram/llama-68m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JackFram/llama-68m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JackFram/llama-68m
- SGLang
How to use JackFram/llama-68m 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 "JackFram/llama-68m" \ --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": "JackFram/llama-68m", "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 "JackFram/llama-68m" \ --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": "JackFram/llama-68m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JackFram/llama-68m with Docker Model Runner:
docker model run hf.co/JackFram/llama-68m
zero embedding for token_id == `1` (<BOS>)
#7
by poedator - opened
WARNING : This model and its 160M sibling have ALL ZEROS EMBEDDING for token_id==1 (<BOS>). This creates confusion in measuring StatisCache sequence length. The transformers maintainers chose to detect it based on non-zero cache values, but the all-zeros embedding distorts the get_seq_length(). No blame here, just a combination of design decisions with unpredictable results.
See the relevant transformers line here https://github.com/huggingface/transformers/blob/8c12690cecbb97e187861e386f7a0ac790e4236c/src/transformers/cache_utils.py#L414