Text Generation
Transformers
Safetensors
Spanish
English
llama
text-generation-inference
unsloth
trl
sft
conversational
Instructions to use krory/GenBook-Deepseek-R1.Llama-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use krory/GenBook-Deepseek-R1.Llama-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="krory/GenBook-Deepseek-R1.Llama-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("krory/GenBook-Deepseek-R1.Llama-8B") model = AutoModelForMultimodalLM.from_pretrained("krory/GenBook-Deepseek-R1.Llama-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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use krory/GenBook-Deepseek-R1.Llama-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "krory/GenBook-Deepseek-R1.Llama-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": "krory/GenBook-Deepseek-R1.Llama-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/krory/GenBook-Deepseek-R1.Llama-8B
- SGLang
How to use krory/GenBook-Deepseek-R1.Llama-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 "krory/GenBook-Deepseek-R1.Llama-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": "krory/GenBook-Deepseek-R1.Llama-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 "krory/GenBook-Deepseek-R1.Llama-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": "krory/GenBook-Deepseek-R1.Llama-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use krory/GenBook-Deepseek-R1.Llama-8B 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 krory/GenBook-Deepseek-R1.Llama-8B 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 krory/GenBook-Deepseek-R1.Llama-8B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for krory/GenBook-Deepseek-R1.Llama-8B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="krory/GenBook-Deepseek-R1.Llama-8B", max_seq_length=2048, ) - Docker Model Runner
How to use krory/GenBook-Deepseek-R1.Llama-8B with Docker Model Runner:
docker model run hf.co/krory/GenBook-Deepseek-R1.Llama-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,15 +9,33 @@ tags:
|
|
| 9 |
- sft
|
| 10 |
license: apache-2.0
|
| 11 |
language:
|
|
|
|
| 12 |
- en
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
- **Developed by:** krory
|
| 18 |
-
- **License:** apache-2.0
|
| 19 |
-
- **Finetuned from model :** unsloth/deepseek-r1-distill-llama-8b-unsloth-bnb-4bit
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
- sft
|
| 10 |
license: apache-2.0
|
| 11 |
language:
|
| 12 |
+
- es
|
| 13 |
- en
|
| 14 |
---
|
| 15 |
|
| 16 |
+

|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
### **About the Model**
|
| 20 |
|
| 21 |
+
This model is designed to be a storytelling AI capable of creating fun, engaging, and well-structured narratives. Its purpose is to serve as an interactive tool for generating and experiencing unique stories in real time, tailored to the user's input and preferences.
|
| 22 |
+
|
| 23 |
+
### **Key Features**
|
| 24 |
+
|
| 25 |
+
- **Interactive Narratives:** Produces coherent and entertaining stories based on user prompts, adapting dynamically to maintain engagement.
|
| 26 |
+
- **Consistent World-Building:** Ensures logical progression and consistency in characters, settings, and events across long narratives.
|
| 27 |
+
- **Optimized for Efficiency:** Built to perform reliably on limited hardware while delivering high-quality outputs.
|
| 28 |
+
|
| 29 |
+
### **Training Overview**
|
| 30 |
+
|
| 31 |
+
The model was fine-tuned using datasets focused on narrative construction, character development, and immersive descriptions. Key aspects of the training include:
|
| 32 |
+
|
| 33 |
+
- **Adaptability:** Special attention was given to creating a system that responds flexibly to varied user inputs while maintaining coherence.
|
| 34 |
+
- **Resource Efficiency:** Techniques like LoRA (Low-Rank Adaptation) and 4-bit quantization were employed to optimize memory usage without compromising output quality.
|
| 35 |
+
- **Long-Context Support:** Enhanced with methods to handle extended interactions and complex storylines.
|
| 36 |
+
|
| 37 |
+
### **Purpose**
|
| 38 |
+
|
| 39 |
+
The primary goal of this model is to create a personal, customizable storytelling AI, allowing users to immerse themselves in unique, AI-driven stories anytime.
|
| 40 |
+
|
| 41 |
+
---
|