HuggingFaceH4/ifeval-like-data
Viewer • Updated • 5.61k • 128 • 4
How to use kth8/gemma-3-1b-it-IFeval with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kth8/gemma-3-1b-it-IFeval")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("kth8/gemma-3-1b-it-IFeval")
model = AutoModelForCausalLM.from_pretrained("kth8/gemma-3-1b-it-IFeval")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use kth8/gemma-3-1b-it-IFeval with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "kth8/gemma-3-1b-it-IFeval"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kth8/gemma-3-1b-it-IFeval",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/kth8/gemma-3-1b-it-IFeval
How to use kth8/gemma-3-1b-it-IFeval with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "kth8/gemma-3-1b-it-IFeval" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kth8/gemma-3-1b-it-IFeval",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "kth8/gemma-3-1b-it-IFeval" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kth8/gemma-3-1b-it-IFeval",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use kth8/gemma-3-1b-it-IFeval with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kth8/gemma-3-1b-it-IFeval to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kth8/gemma-3-1b-it-IFeval to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kth8/gemma-3-1b-it-IFeval to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="kth8/gemma-3-1b-it-IFeval",
max_seq_length=2048,
)How to use kth8/gemma-3-1b-it-IFeval with Docker Model Runner:
docker model run hf.co/kth8/gemma-3-1b-it-IFeval
A fine-tune of unsloth/gemma-3-1b-it on the HuggingFaceH4/ifeval-like-data dataset.
System prompt
You are a helpful assistant.
User prompt
We want to teach our daughter the value of a clean home. Can you suggest chores that are appropriate for a child who is who 5 years old?
Assistant response
No Problem! Here are some great chores for a 5-year-old to do.
• Vacuuming: Most kids love the vacuum so this is a great starter chore for a five-year-old. Make sure to go through the do’s and don’t of vacuuming and remind your child not everything gets picked up by a
vacuum.
• Bedroom Cleanup: Teach your child to take care of their bedrooms. Start with picking up toys, this can be made into a game by color or items. Another good way of teaching children to fine-tune their bedrooms is
lining up their shoes, making their beds, and ensuring nothing is out of order.
• Separate Laundry: At 5 a children can easily distinguish between colors, whites, and towels. Have your children separate the laundry to make the task of washing clothes easier and more efficient.
• Folding Laundry: This is a great time to teach children how to fold laundry. At 5 they won’t be perfect but little hands can handle washcloths, hand towels, and mating socks.
• Putting Away Groceries: This is a good way for children to learn everything has a place to go. With your guidance, a small task like putting away groceries will teach them later on how to put away and keep things
neat.
• Dusting: Grab a duster and teach your child how to carefully remove things to dust tables, handrails, or other kid-friendly dustable areas.
• Set and Clean The Table: Most households with small kids have kid-friendly items for the table. Allow your child to set the table before dinner. After dinner teach your child to remove their items and take them to
the kitchen sink to be rinsed off. This chore will become a healthy habit.
• Make The Bed: At five this won’t be perfect, but a child will be able to learn to set the pillow properly and adjust their bedding so it's more tidy. If they use extra blankets at night teach them to put them away or
fold them at the bottom of the bed. Don’t forget to adjust the stuffed animals!
unsloth/gemma-3-1b-itThis model is released under the Gemma license. See the Gemma Terms of Use and Prohibited Use Policy regarding the use of Gemma-generated content.