Text Generation
Transformers
Safetensors
mistral
Merge
lora
fine-tuned
qlora
chat
reasoning
conversational
text-generation-inference
Instructions to use Questionmarkboy/frankenstein-2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Questionmarkboy/frankenstein-2.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Questionmarkboy/frankenstein-2.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Questionmarkboy/frankenstein-2.0") model = AutoModelForCausalLM.from_pretrained("Questionmarkboy/frankenstein-2.0", device_map="auto") 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 Questionmarkboy/frankenstein-2.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Questionmarkboy/frankenstein-2.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Questionmarkboy/frankenstein-2.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Questionmarkboy/frankenstein-2.0
- SGLang
How to use Questionmarkboy/frankenstein-2.0 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 "Questionmarkboy/frankenstein-2.0" \ --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": "Questionmarkboy/frankenstein-2.0", "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 "Questionmarkboy/frankenstein-2.0" \ --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": "Questionmarkboy/frankenstein-2.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Questionmarkboy/frankenstein-2.0 with Docker Model Runner:
docker model run hf.co/Questionmarkboy/frankenstein-2.0
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- mistral
|
| 5 |
+
- merge
|
| 6 |
+
- lora
|
| 7 |
+
- fine-tuned
|
| 8 |
+
- qlora
|
| 9 |
+
- chat
|
| 10 |
+
- reasoning
|
| 11 |
+
base_model:
|
| 12 |
+
- HuggingFaceH4/zephyr-7b-beta
|
| 13 |
+
- teknium/OpenHermes-2.5-Mistral-7B
|
| 14 |
+
- cognitivecomputations/Dolphin-2.6-mistral-7b-dpo
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# π§ Frankenstein 2.0
|
| 18 |
+
|
| 19 |
+
A custom AI assistant stitched together from three Mistral-7B models,
|
| 20 |
+
then fine-tuned β built entirely on Kaggle.
|
| 21 |
+
|
| 22 |
+
## 𧬠What Is This?
|
| 23 |
+
|
| 24 |
+
Frankenstein 2.0 is a **merged model** combining the strengths of three
|
| 25 |
+
open-source models, then fine-tuned with QLoRA on coding + general
|
| 26 |
+
instruction data.
|
| 27 |
+
|
| 28 |
+
| Component | Contribution |
|
| 29 |
+
|---|---|
|
| 30 |
+
| Zephyr-7B-beta | Instruction following + structure |
|
| 31 |
+
| OpenHermes-2.5 | Warmth + conversational tone |
|
| 32 |
+
| Dolphin-2.6-dpo | Obedience + helpfulness |
|
| 33 |
+
|
| 34 |
+
## π Training Details
|
| 35 |
+
|
| 36 |
+
- **Base:** Merge of 3Γ Mistral-7B variants
|
| 37 |
+
- **Fine-tuning:** QLoRA (4-bit NF4)
|
| 38 |
+
- **LoRA:** rank 16, alpha 32
|
| 39 |
+
- **Data:** 3000 general + 3000 coding examples
|
| 40 |
+
- **Hardware:** 2Γ NVIDIA Tesla T4 (Kaggle)
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
## π‘ Capabilities
|
| 44 |
+
|
| 45 |
+
β
Python coding & debugging
|
| 46 |
+
β
Explaining complex topics simply
|
| 47 |
+
β
Step-by-step reasoning (with `<think>` tags)
|
| 48 |
+
β
Document Q&A (RAG-ready)
|
| 49 |
+
β
Tool use (web search, calculator)
|
| 50 |
+
|
| 51 |
+
## π How To Use
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 55 |
+
import torch
|
| 56 |
+
|
| 57 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 58 |
+
"Questionmarkboy/frankenstein-2.0",
|
| 59 |
+
torch_dtype=torch.float16,
|
| 60 |
+
device_map="auto"
|
| 61 |
+
)
|
| 62 |
+
tokenizer = AutoTokenizer.from_pretrained("Questionmarkboy/frankenstein-2.0")
|
| 63 |
+
|
| 64 |
+
messages = [{"role": "user", "content": "Explain blockchain to a 10-year-old"}]
|
| 65 |
+
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True,
|
| 66 |
+
return_tensors="pt").to(model.device)
|
| 67 |
+
output = model.generate(inputs, max_new_tokens=200)
|
| 68 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## β οΈ Limitations
|
| 72 |
+
|
| 73 |
+
- 7B model β may struggle with very long code generation (e.g. full HTML apps)
|
| 74 |
+
- Knowledge limited to training data
|
| 75 |
+
- Best for English tasks
|
| 76 |
+
|
| 77 |
+
## π Credits
|
| 78 |
+
|
| 79 |
+
- Base models by [HuggingFaceH4](https://huggingface.co/HuggingFaceH4),
|
| 80 |
+
[Teknium](https://huggingface.co/teknium), and
|
| 81 |
+
[Cognitive Computations](https://huggingface.co/cognitivecomputations)
|
| 82 |
+
- Built with Kaggle
|
| 83 |
+
|
| 84 |
+
## π License
|
| 85 |
+
|
| 86 |
+
Apache 2.0 (inherited from Mistral base). Please credit the original
|
| 87 |
+
base models when using this.
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
*It's alive! π§β‘*
|