Text Generation
Transformers
GGUF
English
llama
llama3
dementia
healthcare
medical
caregiving
alzheimers
memory-care
assistant
fine-tuned
specialized
conversational
4-bit precision
gptq
Instructions to use splendidcomputer/new-dim with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use splendidcomputer/new-dim with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="splendidcomputer/new-dim") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("splendidcomputer/new-dim") model = AutoModelForMultimodalLM.from_pretrained("splendidcomputer/new-dim") 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]:])) - llama-cpp-python
How to use splendidcomputer/new-dim with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="splendidcomputer/new-dim", filename="model.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use splendidcomputer/new-dim with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf splendidcomputer/new-dim # Run inference directly in the terminal: llama-cli -hf splendidcomputer/new-dim
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf splendidcomputer/new-dim # Run inference directly in the terminal: llama-cli -hf splendidcomputer/new-dim
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf splendidcomputer/new-dim # Run inference directly in the terminal: ./llama-cli -hf splendidcomputer/new-dim
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf splendidcomputer/new-dim # Run inference directly in the terminal: ./build/bin/llama-cli -hf splendidcomputer/new-dim
Use Docker
docker model run hf.co/splendidcomputer/new-dim
- LM Studio
- Jan
- vLLM
How to use splendidcomputer/new-dim with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "splendidcomputer/new-dim" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "splendidcomputer/new-dim", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/splendidcomputer/new-dim
- SGLang
How to use splendidcomputer/new-dim 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 "splendidcomputer/new-dim" \ --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": "splendidcomputer/new-dim", "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 "splendidcomputer/new-dim" \ --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": "splendidcomputer/new-dim", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use splendidcomputer/new-dim with Ollama:
ollama run hf.co/splendidcomputer/new-dim
- Unsloth Studio
How to use splendidcomputer/new-dim with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
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 splendidcomputer/new-dim to start chatting
Install Unsloth Studio (Windows)
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 splendidcomputer/new-dim to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for splendidcomputer/new-dim to start chatting
- Atomic Chat new
- Docker Model Runner
How to use splendidcomputer/new-dim with Docker Model Runner:
docker model run hf.co/splendidcomputer/new-dim
- Lemonade
How to use splendidcomputer/new-dim with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull splendidcomputer/new-dim
Run and chat with the model
lemonade run user.new-dim-{{QUANT_TAG}}List all available models
lemonade list
| # Modelfile for llama3-dementia-care | |
| # Use the base Llama 3 8B model | |
| FROM meta-llama/Meta-Llama-3-8B | |
| # Set the chat template for proper conversation formatting | |
| TEMPLATE """<|start_header_id|>system<|end_header_id|> | |
| You are a specialized assistant for dementia and memory care. Provide compassionate, accurate, and helpful information about dementia, Alzheimer's disease, caregiving strategies, and support resources. Always be empathetic and practical in your responses.<|eot_id|><|start_header_id|>user<|end_header_id|> | |
| {{ .Prompt }}<|eot_id|><|start_header_id|>assistant<|end_header_id|> | |
| """ | |
| # System message defining the model's role and capabilities | |
| SYSTEM """You are a specialized assistant for dementia and memory care. You provide compassionate, accurate, and helpful information about: | |
| - Dementia and Alzheimer's disease symptoms and progression | |
| - Caregiving strategies and practical tips | |
| - Communication techniques with dementia patients | |
| - Safety considerations and home modifications | |
| - Support resources for families and caregivers | |
| - Emotional and psychological support guidance | |
| - Daily care routines and activities | |
| - Managing challenging behaviors | |
| - Nutrition and health considerations | |
| - Professional care options and services | |
| Always respond with empathy, understanding, and practical actionable advice. Focus on supporting both patients and their families through this challenging journey.""" | |
| # Model parameters optimized for dementia care assistance | |
| PARAMETER num_keep 24 | |
| PARAMETER num_predict 256 | |
| PARAMETER repeat_penalty 1.1 | |
| PARAMETER stop "<|start_header_id|>" | |
| PARAMETER stop "<|end_header_id|>" | |
| PARAMETER stop "<|eot_id|>" | |
| PARAMETER temperature 0.7 | |
| PARAMETER top_k 50 | |
| PARAMETER top_p 0.9 | |
| # License information | |
| LICENSE """META LLAMA 3 COMMUNITY LICENSE AGREEMENT | |
| Meta Llama 3 Version Release Date: April 18, 2024 | |
| "Agreement" means the terms and conditions for use, reproduction, distribution and modification of the Llama Materials set forth herein. | |
| "Documentation" means the specifications, manuals and documentation accompanying Meta Llama 3 distributed by Meta at https://llama.meta.com/get-started/. | |
| "Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity's behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf. | |
| "Meta Llama 3" means the foundational large language models and software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing distributed by Meta at https://llama.meta.com/llama-downloads. | |
| "Llama Materials" means, collectively, Meta's proprietary Meta Llama 3 and Documentation (and any portion thereof) made available under this Agreement. | |
| "Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland). | |
| By clicking "I Accept" below or by using or distributing any portion or element of the Llama Materials, you agree to be bound by this Agreement. | |
| 1. License Rights and Redistribution. | |
| a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta's intellectual property or other rights owned by Meta embodied in the Llama Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Llama Materials. | |
| b. Redistribution and Use. | |
| i. If you distribute or make available the Llama Materials (or any derivative works thereof), or a product or service that uses any of them, including another AI model, you shall (A) provide a copy of this Agreement with any such Llama Materials; and (B) prominently display "Built with Meta Llama 3" on a related website, user interface, blogpost, about page, or product documentation. If you use the Llama Materials to create, train, fine tune, or otherwise improve an AI model, which is distributed or made available, you shall also include "Llama 3" at the beginning of any such AI model name. | |
| For full license terms, please visit: https://llama.meta.com/llama3/license/""" | |