This is my own fine-tune of SmolLM2-360M-Instruct. It is designed to be a friendly and engaging assistant, or a supportive and empathetic companion depending on the context of the conversation.

Note: Due to the model's small size, it is prone to making things up, so don't expect factual accuracy from this model.

You can try the model out here.

Model Trained Using AutoTrain

This model was trained using AutoTrain. For more information, please visit AutoTrain.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("fungamer2/SmolLM2-360M-Instruct-SFT-Test")
model = AutoModelForCausalLM.from_pretrained("fungamer2/SmolLM2-360M-Instruct-SFT-Test")

def generate_response(prompt):
    messages = [
        {"role": "user", "content": prompt},
    ]
    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=1024, do_sample=True, temperature=0.5)
    return tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)

print(generate_response("Explain photosynthesis in simple terms."))
"""
Photosynthesis is like nature's way of turning sunlight into energy! 🌱 Imagine you're a tiny plant, and sunlight is your energy source - that's photosynthesis! Here's how it works:

### 🌞 The Sun's Power
Sunlight hits a plant, and special helpers called chlorophyll (a green pigment) absorb it. 🌞
- Chlorophyll gives the plant its green color because it's the main "solar panel" of the plant!
- It uses the energy from sunlight to create food - like a plant's version of a snack (sugar).

### πŸ’Š The Light-Dependent Reactions
- Water (from soil) and carbon dioxide (from the air) hit the plant, and the chlorophyll *breaks* them down into oxygen and energy. 🌱
- Oxygen (the air we breathe) is the winner here - it's the plant's way of giving us a breath of fresh air!

### 🌍 The Light-Independent Reactions
- The plant uses the oxygen and energy from the broken-down water to build its food. πŸ’Š
- This process is called the Calvin Cycle, and it's like a plant's tiny factory that turns sunlight into energy.

### πŸ”₯ The End Result
The plant turns sunlight into energy, which it uses to grow - kind of like how we eat food to fuel our bodies! 🍎

So, photosynthesis is nature's way of turning sunlight into food for plants, which then feed us and the animals that eat them. Pretty cool, right? Do you have a favorite part of this process?
"""

print(generate_response("I'm having trouble sleeping at night, and I think it's because I'm stressed about work. What should I do?"))
"""
Ugh, I hear you - stress can really mess with your sleep, and it's so frustrating when it feels like work is taking up too much of your day. Let's tackle this together.

First, try to identify what's causing the stress. Is it the deadline looming over you, a difficult client, or maybe something else? Once you figure out what's making the stress feel overwhelming, we can work on ways to manage it, like prioritizing tasks, taking breaks, or even just deep breathing exercises.

If you're still feeling anxious about work, it might be helpful to talk it through with someone you trust, like a manager or a colleague. Sometimes just sharing your concerns can make a big difference.

And if all else fails, we can explore sleep-friendly habits - like avoiding screens before bed, keeping a consistent sleep schedule, and maybe even trying a relaxing bedtime routine (like reading or listening to calming music).

What's been weighing on you the most lately? Is it a specific task, a client, or something else entirely? Let's work together to figure out how to make your sleep a little easier to handle. πŸ’›
"""
Downloads last month
87
Safetensors
Model size
0.4B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for fungamer2/SmolLM2-360M-Instruct-SFT-Test

Finetuned
(113)
this model

Space using fungamer2/SmolLM2-360M-Instruct-SFT-Test 1