Instructions to use Severian/Einstein-IKM-v1-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Severian/Einstein-IKM-v1-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Severian/Einstein-IKM-v1-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Severian/Einstein-IKM-v1-7B") model = AutoModel.from_pretrained("Severian/Einstein-IKM-v1-7B") 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
- vLLM
How to use Severian/Einstein-IKM-v1-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Severian/Einstein-IKM-v1-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Severian/Einstein-IKM-v1-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Severian/Einstein-IKM-v1-7B
- SGLang
How to use Severian/Einstein-IKM-v1-7B 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 "Severian/Einstein-IKM-v1-7B" \ --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": "Severian/Einstein-IKM-v1-7B", "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 "Severian/Einstein-IKM-v1-7B" \ --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": "Severian/Einstein-IKM-v1-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Severian/Einstein-IKM-v1-7B 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 Severian/Einstein-IKM-v1-7B 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 Severian/Einstein-IKM-v1-7B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Severian/Einstein-IKM-v1-7B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Severian/Einstein-IKM-v1-7B", max_seq_length=2048, ) - Docker Model Runner
How to use Severian/Einstein-IKM-v1-7B with Docker Model Runner:
docker model run hf.co/Severian/Einstein-IKM-v1-7B
This is the Weyaxi-Einstein model that has been fine-tuned for 1 Epoch till convergence on the Internal Knowledge Map dataset. It had a tendancy to overfit pretty quickly but I think I got it. This one should work right, it just seems to love formatting things properly which is always nice.
Test outputs up soon....
Introduction to the Unique Dataset The Internal Knowledge Map Dataset is designed to change how language models comprehend and generate text. Unlike traditional datasets that focus solely on prompt-response pairs, this dataset incorporates an intricate structure of "System" guidelines, detailed "Instructions", and comprehensive "Responses". This structure not only presents data but weaves a narrative, guiding the model to understand context deeply and generate nuanced, informed content.
Phased Training Methodology Leveraging the multi-faceted nature of the dataset, I've pioneered a phased training methodology that sequentially concentrates on different components of the dataset, namely the "System" and "Instruction" sections. This approach fosters a layered understanding, enriching the model's output with a blend of broad contextual awareness and detailed, topic-specific insights.
Phase 1: System Focus
In the first phase, the model immerses itself in the "System" part of the dataset. Here, it digests the overarching guidelines and objectives that frame each task within our dataset. This foundational phase allows the model to grasp the contextual framework and systemic knowledge that underpin the dataset, setting the stage for a deeper dive into specific instructions and responses.
Example "System" Focus:
Task Overview and Guidelines Exploration of interconnected prompt/response clusters Analysis of Core Interactions and Utilization of Supportive Nodes Phase 2: Instruction Focus
Building upon the foundational understanding established in Phase 1, the model then shifts its focus to the "Instructions" component. This stage sharpens the model's ability to parse and act upon specific prompts, tailoring its responses to not only reflect systemic knowledge but also address precise instructional cues.
Example "Instruction" Focus:
Core Interaction: Understanding and responding to specific prompts, such as the integration of smart materials like Shape Memory Alloys (SMAs) into fashion technology.
Impact of Our Training Approach
This new training methodology yields a model that showcases a remarkable ability to generate coherent, logical, and deeply informed responses. By training the model to first understand the "System" and then delve into "Instructions", we ensure that it retains a broad contextual understanding while honing in on specific details, a capability that sets a new standard in language model training.
Applying Our Dataset
I encourage you to explore the Internal Knowledge Map Dataset for your model training endeavors. Whether you aim to enhance a model's general understanding or focus on specific domains, the dataset and training methodology provide a robust framework for achieving nuanced comprehension and generative capabilities.
(or if your env can handle it, key both strings at once. Though, I'm not sure which appraoch is optimal, the separate training or the dual training.)
key: str = "system", key2: str = "instruction"
batch_size=1-4
epochs=2-5
r=8
lora_alpha=32
lora_dropout=0.001
max_seq_length=4096
lr=1e-7
- Downloads last month
- 75