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
File size: 4,789 Bytes
fa9878d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | #!/bin/bash
# Script to prepare Ollama model for Hugging Face upload
# This script helps export the Ollama model and prepare it for Hugging Face
set -e
MODEL_NAME="llama3-dementia-care:latest"
EXPORT_DIR="./model_export"
CURRENT_DIR=$(pwd)
echo "π Preparing Llama 3 Dementia Care model for Hugging Face upload..."
echo "=================================================="
# Check if Ollama is installed
if ! command -v ollama &> /dev/null; then
echo "β Error: Ollama is not installed or not in PATH"
echo "Please install Ollama first: https://ollama.com"
exit 1
fi
# Check if the model exists
if ! ollama list | grep -q "$MODEL_NAME"; then
echo "β Error: Model $MODEL_NAME not found"
echo "Available models:"
ollama list
exit 1
fi
echo "β
Found model: $MODEL_NAME"
# Create export directory
mkdir -p "$EXPORT_DIR"
cd "$EXPORT_DIR"
echo "π Created export directory: $EXPORT_DIR"
# Export model information
echo "π Exporting model information..."
ollama show "$MODEL_NAME" > model_details.txt
ollama show "$MODEL_NAME" --modelfile > exported_modelfile.txt
echo "π Model details saved to:"
echo " - model_details.txt"
echo " - exported_modelfile.txt"
# Create a README for the export
cat > export_README.md << 'EOF'
# Exported Ollama Model Files
This directory contains the exported files from your Ollama model that need to be converted for Hugging Face.
## Files:
- `model_details.txt` - Detailed model information from Ollama
- `exported_modelfile.txt` - The Modelfile configuration
- `export_README.md` - This file
## Next Steps:
### Option 1: Manual Conversion
1. You'll need to manually extract the model weights from Ollama's blob storage
2. Convert them to PyTorch/Safetensors format
3. Create proper tokenizer files
### Option 2: Use Conversion Tools
1. Install ollama-python: `pip install ollama`
2. Use conversion scripts like:
- https://github.com/ollama/ollama/blob/main/docs/modelfile.md
- Community conversion tools
### Option 3: Re-train/Fine-tune
1. Start with the base Llama 3 8B model from Hugging Face
2. Fine-tune it with your dementia care dataset
3. Upload the fine-tuned model
## Important Notes:
- Ollama stores models in a specific format that may require conversion
- The model weights are typically in `/Users/[username]/.ollama/models/blobs/`
- You may need to use specialized tools to extract and convert the weights
For more information, visit: https://ollama.com/blog/modelfile
EOF
echo "π Created export_README.md with next steps"
# Try to locate the actual model blob
echo "π Locating model blob files..."
OLLAMA_MODELS_DIR="$HOME/.ollama/models"
if [ -d "$OLLAMA_MODELS_DIR" ]; then
echo "π Ollama models directory: $OLLAMA_MODELS_DIR"
# Extract the blob SHA from the Modelfile
BLOB_SHA=$(grep "^FROM" exported_modelfile.txt | grep "sha256" | awk -F'sha256-' '{print $2}')
if [ -n "$BLOB_SHA" ]; then
echo "π Model blob SHA: $BLOB_SHA"
BLOB_PATH="$OLLAMA_MODELS_DIR/blobs/sha256-$BLOB_SHA"
if [ -f "$BLOB_PATH" ]; then
echo "β
Found model blob: $BLOB_PATH"
echo "π Blob size: $(ls -lh "$BLOB_PATH" | awk '{print $5}')"
# Copy blob info to export
echo "Model Blob Information:" > blob_info.txt
echo "SHA256: $BLOB_SHA" >> blob_info.txt
echo "Path: $BLOB_PATH" >> blob_info.txt
echo "Size: $(ls -lh "$BLOB_PATH" | awk '{print $5}')" >> blob_info.txt
echo "Modified: $(ls -l "$BLOB_PATH" | awk '{print $6, $7, $8}')" >> blob_info.txt
else
echo "β Model blob not found at expected location"
fi
else
echo "β Could not extract blob SHA from Modelfile"
fi
else
echo "β Ollama models directory not found"
fi
cd "$CURRENT_DIR"
echo ""
echo "π Export preparation complete!"
echo "=================================================="
echo "π Files exported to: $EXPORT_DIR"
echo ""
echo "β οΈ IMPORTANT: Converting Ollama models to Hugging Face format requires additional steps:"
echo ""
echo "π Conversion Options:"
echo "1. Use ollama-python and conversion tools"
echo "2. Extract and convert model weights manually"
echo "3. Re-train using the base Llama 3 model on Hugging Face"
echo ""
echo "π Resources:"
echo "- Ollama documentation: https://ollama.com/blog/modelfile"
echo "- Hugging Face model upload: https://huggingface.co/docs/transformers/model_sharing"
echo ""
echo "β
Your repository structure is ready for Hugging Face!"
echo "π Repository files created:"
ls -la "$CURRENT_DIR" | grep -E '\.(md|json|txt|py)$|Modelfile|NOTICE'
echo ""
echo "π Next: Upload your repository to Hugging Face and add the converted model weights."
|