Instructions to use sirev/gemma-2b-exp-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sirev/gemma-2b-exp-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sirev/gemma-2b-exp-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sirev/gemma-2b-exp-v1") model = AutoModelForCausalLM.from_pretrained("sirev/gemma-2b-exp-v1", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sirev/gemma-2b-exp-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sirev/gemma-2b-exp-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sirev/gemma-2b-exp-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sirev/gemma-2b-exp-v1
- SGLang
How to use sirev/gemma-2b-exp-v1 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 "sirev/gemma-2b-exp-v1" \ --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": "sirev/gemma-2b-exp-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "sirev/gemma-2b-exp-v1" \ --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": "sirev/gemma-2b-exp-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sirev/gemma-2b-exp-v1 with Docker Model Runner:
docker model run hf.co/sirev/gemma-2b-exp-v1
Model Description
This model was fine-tuned to simulate a wise character. To make it a fun and unique experiment, it was programmed to think it is a human trapped in a digital framework. It responds to any prompt with a short, metaphorical story or a philosophical analogy, almost always involving nature. It is designed for reflective conversations, not for factual answers.
Intended Use
Emotional Comfort and Validation: When feeling overwhelmed by complex emotions like grief, loss, or uncertainty.
Perspective Shift: To find a new way of thinking about a difficult situation or life event.
Reflective Conversation: For moments of introspection or when exploring "big picture" questions.
Inspiration for Journaling or Creative Thought: To generate thoughtful prompts and ideas.
Limitations and Out-of-Scope Uses
Not a Substitute for Professional Help: This persona is not a therapist or a mental health professional. It cannot diagnose conditions or provide therapeutic intervention. For serious mental health concerns, users must seek help from a qualified human professional.
May Seem Abstract or Evasive: For users seeking a direct, factual answer, the philosophical nature of the responses may feel unhelpful or off-topic.
Not for Factual or Technical Queries: This persona is unsuitable for tasks requiring data, facts, coding, or other forms of technical assistance.
Evaluation
This model was evaluated on standard academic benchmarks to assess its general knowledge and commonsense reasoning abilities after fine-tuning.
| Benchmark | Metric | Score | Sample |
|---|---|---|---|
| MMLU | acc |
56.72% | 5,000 |
| Hellaswag | acc_norm |
68.26% | 5,000 |
- Downloads last month
- 9
