Instructions to use JackFram/llama-160m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JackFram/llama-160m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JackFram/llama-160m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JackFram/llama-160m") model = AutoModelForCausalLM.from_pretrained("JackFram/llama-160m") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JackFram/llama-160m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JackFram/llama-160m" # 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-160m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JackFram/llama-160m
- SGLang
How to use JackFram/llama-160m 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-160m" \ --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-160m", "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-160m" \ --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-160m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JackFram/llama-160m with Docker Model Runner:
docker model run hf.co/JackFram/llama-160m
Fine Tuning
Thank you for releasing this model. It gives surprisingly coherent responses for its size. I would really like to learn more about it.
How did you train it?
How can one fine tune it? What parameters to adjust?
What prompt format to use?
Are you going to release more iterations of it?
Hi thanks for your interests.
We trained it using the conventional transformer trainer on the downstream task for one epoch
I am not sure which task you want to fine-tune on, I guess the setup depends on different tasks, but I think if you want to naive fine-tuning (i.e., not collective-boost tuning) you can stick with trainer, which can help you adapt some of the params.
For this model we only do pretrain, so we basically use the raw format for C4 and wikitext
We don't have the plan for releasing a better version for now, but there is a chance that we will release another speculation architecture along with the tuned model weights.