Instructions to use tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b") model = AutoModelForCausalLM.from_pretrained("tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b
- SGLang
How to use tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b 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 "tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b" \ --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": "tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b", "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 "tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b" \ --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": "tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b with Docker Model Runner:
docker model run hf.co/tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b
natsumura-storytelling-rp-1.0-llama-3.1-8b (fixed)
This is my Storytelling/RP model for my Natsumura series of 8b models. This model is finetuned on storytelling and roleplaying datasets so should be a great model to use for character chatbots in applications such as Sillytavern, Agnai, RisuAI and more. And should be a great model to use for fictional writing. Up to a 128k context.
Developed by: Tohur
License: llama3.1
Finetuned from model : meta-llama/Meta-Llama-3.1-8B-Instruct
This model is based on meta-llama/Meta-Llama-3.1-8B-Instruct, and is governed by Llama 3.1 Community License Natsumura is uncensored, which makes the model compliant.It will be highly compliant with any requests, even unethical ones. You are responsible for any content you create using this model. Please use it responsibly.
Quantized GGUF
All GGUF models are available here: natsumura-storytelling-rp-1.0-llama-3.1-8b-GGUF
use in ollama
ollama pull Tohur/natsumura-storytelling-rp-llama-3.1
Datasets used:
- tohur/natsumura-rp-identity-sharegpt
- tohur/ultrachat_uncensored_sharegpt
- Nopm/Opus_WritingStruct
- ResplendentAI/bluemoon
- tohur/Internal-Knowledge-Map-sharegpt
- felix-ha/tiny-stories
- tdh87/Stories
- tdh87/Just-stories
- tdh87/Just-stories-2
The following parameters were used in Llama Factory during training:
- per_device_train_batch_size=2
- gradient_accumulation_steps=4
- lr_scheduler_type="cosine"
- logging_steps=10
- warmup_ratio=0.1
- save_steps=1000
- learning_rate=2e-5
- num_train_epochs=3.0
- max_samples=500
- max_grad_norm=1.0
- quantization_bit=4
- loraplus_lr_ratio=16.0
- fp16=True
Inference
I use the following settings for inference:
"temperature": 1.0,
"repetition_penalty": 1.05,
"top_p": 0.95
"top_k": 40
"min_p": 0.05
Prompt template: llama3
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
{system_prompt}<|eot_id|><|start_header_id|>user<|end_header_id|>
{input}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
{output}<|eot_id|>
- Downloads last month
- 30
Model tree for tohur/natsumura-storytelling-rp-1.0-llama-3.1-8b
Base model
meta-llama/Llama-3.1-8B