Instructions to use npc-worldwide/TinyTimV1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use npc-worldwide/TinyTimV1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="npc-worldwide/TinyTimV1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("npc-worldwide/TinyTimV1") model = AutoModelForCausalLM.from_pretrained("npc-worldwide/TinyTimV1") 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 npc-worldwide/TinyTimV1 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="npc-worldwide/TinyTimV1", filename="ggml-model-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use npc-worldwide/TinyTimV1 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf npc-worldwide/TinyTimV1:F16 # Run inference directly in the terminal: llama-cli -hf npc-worldwide/TinyTimV1:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf npc-worldwide/TinyTimV1:F16 # Run inference directly in the terminal: llama-cli -hf npc-worldwide/TinyTimV1:F16
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 npc-worldwide/TinyTimV1:F16 # Run inference directly in the terminal: ./llama-cli -hf npc-worldwide/TinyTimV1:F16
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 npc-worldwide/TinyTimV1:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf npc-worldwide/TinyTimV1:F16
Use Docker
docker model run hf.co/npc-worldwide/TinyTimV1:F16
- LM Studio
- Jan
- vLLM
How to use npc-worldwide/TinyTimV1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "npc-worldwide/TinyTimV1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "npc-worldwide/TinyTimV1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/npc-worldwide/TinyTimV1:F16
- SGLang
How to use npc-worldwide/TinyTimV1 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 "npc-worldwide/TinyTimV1" \ --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": "npc-worldwide/TinyTimV1", "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 "npc-worldwide/TinyTimV1" \ --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": "npc-worldwide/TinyTimV1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use npc-worldwide/TinyTimV1 with Ollama:
ollama run hf.co/npc-worldwide/TinyTimV1:F16
- Unsloth Studio new
How to use npc-worldwide/TinyTimV1 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 npc-worldwide/TinyTimV1 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 npc-worldwide/TinyTimV1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for npc-worldwide/TinyTimV1 to start chatting
- Docker Model Runner
How to use npc-worldwide/TinyTimV1 with Docker Model Runner:
docker model run hf.co/npc-worldwide/TinyTimV1:F16
- Lemonade
How to use npc-worldwide/TinyTimV1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull npc-worldwide/TinyTimV1:F16
Run and chat with the model
lemonade run user.TinyTimV1-F16
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
TinyTimV1: Fine-tuning TinyLlama on Finnegan's Wake
A project exploring the fine-tuning of TinyLlama-1.1B on James Joyce's Finnegan's Wake to generate Joyce-inspired text.
Overview
This project fine-tunes the TinyLlama-1.1B-Chat model on the complete text of James Joyce's Finnegan's Wake, creating a language model capable of generating text in Joyce's distinctive experimental style. The model learns to replicate the complex wordplay, neologisms, and stream-of-consciousness narrative techniques characteristic of Joyce's final work.
Files
process_wake.py- Preprocesses the raw text, removes page numbers, and splits into manageable chunksfine_tune_joyce.py- Main training script using HuggingFace Transformerstext_gen.py- Text generation script for the fine-tuned modelfinn_wake.txt- Complete text of Finnegan's Wake (1.51 MB)finn_wake.csv- Processed dataset in CSV formatfinn_wake_dataset/- Tokenized dataset directory
Usage
1. Data Preprocessing
python process_wake.py
This removes page numbers and splits the text into 100-word chunks for training. 2. Fine-tuning
python fine_tune_joyce.py
Fine-tunes TinyLlama on the processed dataset for 3 epochs with CPU training. 3. Text Generation
python text_gen.py
Generates Joyce-inspired text using the fine-tuned model.
Model Details
Base Model: TinyLlama-1.1B-Chat-v1.0 Training Data: Finnegan's Wake (~1.5MB text) Training Parameters:
3 epochs Batch size: 1 Max sequence length: 128 tokens Temperature: 0.7 Top-k: 50, Top-p: 0.95
Example Output Input: "ae left to go to ireland and found a fairy" The model generates text continuing in Joyce's experimental style with invented words, Irish references, and complex linguistic play. Requirements transformers datasets pandas torch Installation bashpip install transformers datasets pandas torch Notes
Training was performed on CPU due to resource constraints Model checkpoints saved every 500 steps Resume training supported from checkpoints
- Downloads last month
- 155
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="npc-worldwide/TinyTimV1", filename="ggml-model-f16.gguf", )