Text Generation
Transformers
Safetensors
llama
Generated from Trainer
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca") model = AutoModelForCausalLM.from_pretrained("mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca
- SGLang
How to use mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca 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 "mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca" \ --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": "mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca", "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 "mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca" \ --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": "mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca with Docker Model Runner:
docker model run hf.co/mrm8488/tinyllama-bnb-4bit-ft-codeAlpaca
Update README.md
Browse files
README.md
CHANGED
|
@@ -51,21 +51,12 @@ The following hyperparameters were used during training:
|
|
| 51 |
|
| 52 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 53 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 54 |
-
| 1.
|
| 55 |
-
|
|
| 56 |
-
|
|
| 57 |
-
| 0.
|
| 58 |
-
| 0.
|
| 59 |
-
| 0.
|
| 60 |
-
| 0.857 | 2.31 | 140 | 0.8580 |
|
| 61 |
-
| 0.8316 | 2.64 | 160 | 0.8346 |
|
| 62 |
-
| 0.8351 | 2.98 | 180 | 0.8203 |
|
| 63 |
-
| 0.8204 | 3.31 | 200 | 0.8103 |
|
| 64 |
-
| 0.7888 | 3.64 | 220 | 0.8035 |
|
| 65 |
-
| 0.7677 | 3.97 | 240 | 0.7985 |
|
| 66 |
-
| 0.7753 | 4.3 | 260 | 0.7952 |
|
| 67 |
-
| 0.7912 | 4.63 | 280 | 0.7931 |
|
| 68 |
-
| 0.7631 | 4.96 | 300 | 0.7926 |
|
| 69 |
|
| 70 |
|
| 71 |
### Framework versions
|
|
@@ -73,4 +64,4 @@ The following hyperparameters were used during training:
|
|
| 73 |
- Transformers 4.37.0.dev0
|
| 74 |
- Pytorch 2.1.0+cu121
|
| 75 |
- Datasets 2.16.1
|
| 76 |
-
- Tokenizers 0.15.0
|
|
|
|
| 51 |
|
| 52 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 53 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 54 |
+
| 1.1517 | 0.83 | 50 | 1.1598 |
|
| 55 |
+
| 0.9428 | 1.65 | 100 | 0.9327 |
|
| 56 |
+
| 0.8319 | 2.48 | 150 | 0.8448 |
|
| 57 |
+
| 0.8205 | 3.31 | 200 | 0.8102 |
|
| 58 |
+
| 0.7977 | 4.13 | 250 | 0.7966 |
|
| 59 |
+
| 0.763 | 4.96 | 300 | 0.7926 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
### Framework versions
|
|
|
|
| 64 |
- Transformers 4.37.0.dev0
|
| 65 |
- Pytorch 2.1.0+cu121
|
| 66 |
- Datasets 2.16.1
|
| 67 |
+
- Tokenizers 0.15.0
|