Downloads · 30 days
144
30% of all-time downloads
ClaireLee2429/gemma-2b-recipes-gguf
gemma-2b-recipes-gguf is a text generation model from ClaireLee2429. Use it when you need the model to write or continue text. It is set up for llama-cpp-python. The card lists the license as gemma.
Quantized GGUF version of google/gemma-2b fine-tuned on recipe data for recipe generation.
Downloads · 30 days
144
30% of all-time downloads
All-time downloads
474
Public
Repo size
3.3 GB
Likes
0
Public
Click a slice to open those files.
.gguf1.6 GB · 100%
From the Hugging Face model README
Quantized GGUF version of google/gemma-2b fine-tuned on recipe data for recipe generation.
| Base model | google/gemma-2b |
| LoRA adapter | ClaireLee2429/gemma-2b-recipes-lora |
| Training data | corbt/all-recipes |
| Quantization | Q4_K_M (4-bit, K-means) |
| File size | ~1.5 GB |
| Context length | 8192 tokens |
| Format | GGUF (llama.cpp compatible) |
convert_hf_to_gguf.py from llama.cppllama-quantizefrom huggingface_hub import hf_hub_download
from llama_cpp import Llama
model_path = hf_hub_download(
repo_id="ClaireLee2429/gemma-2b-recipes-gguf",
filename="model.q4_k_m.gguf",
)
llm = Llama(model_path=model_path, n_threads=8, n_ctx=2048)
output = llm.create_completion(
"Recipe for chocolate chip cookies:\n",
max_tokens=256,
temperature=0.7,
top_p=0.9,
repeat_penalty=1.2,
)
print(output["choices"][0]["text"])
./llama-cli -m model.q4_k_m.gguf -p "Recipe for pasta carbonara:" -n 256
Recipe for chocolate chip cookies:
- 1/2 cup butter
- 1/3 cup sugar
- 1 egg
- 1/4 teaspoon vanilla
- 2/3 cup white flour
- 1/3 cup all-purpose flour
- 1/8 teaspoon baking soda
- 1/8 teaspoon salt
- 1/2 teaspoon cinnamon
- 1/4 cup chocolate chips
Directions:
- Sift together the flours.
- Add in salt and baking powder and mix.
- Add in vanilla, egg and sugar and mix well.
- Roll out on a lightly floured board and cut into desired shapes
and place on an ungreased cookie sheet.
- Bake at 375 degrees for 10-12 minutes.
Benchmarked on Apple M-series (Metal) and estimated for CPU-only server:
| Environment | Time to first token | Tokens/sec |
|---|---|---|
| Apple Silicon (Metal) | ~0.1s | ~90 tok/s |
| 8 vCPU server (CPU only) | ~1-2s | ~10-20 tok/s |