Instructions to use ethicalabs/xLSTM-7b-Polymath-PEFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ethicalabs/xLSTM-7b-Polymath-PEFT with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ethicalabs/xLSTM-7b-Instruct") model = PeftModel.from_pretrained(base_model, "ethicalabs/xLSTM-7b-Polymath-PEFT") - Transformers
How to use ethicalabs/xLSTM-7b-Polymath-PEFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ethicalabs/xLSTM-7b-Polymath-PEFT")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ethicalabs/xLSTM-7b-Polymath-PEFT", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ethicalabs/xLSTM-7b-Polymath-PEFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ethicalabs/xLSTM-7b-Polymath-PEFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ethicalabs/xLSTM-7b-Polymath-PEFT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ethicalabs/xLSTM-7b-Polymath-PEFT
- SGLang
How to use ethicalabs/xLSTM-7b-Polymath-PEFT 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 "ethicalabs/xLSTM-7b-Polymath-PEFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ethicalabs/xLSTM-7b-Polymath-PEFT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ethicalabs/xLSTM-7b-Polymath-PEFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ethicalabs/xLSTM-7b-Polymath-PEFT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ethicalabs/xLSTM-7b-Polymath-PEFT with Docker Model Runner:
docker model run hf.co/ethicalabs/xLSTM-7b-Polymath-PEFT
Model Card for xlstm-7b-instruct-phase-2
This model is a fine-tuned version of ethicalabs/xLSTM-7b-Instruct for task alignment.
It has been trained using TRL using SFT on assistant-only tokens.
The k_proj and v_proj matrices have been frozen to isolate and preserve the model's pre-trained knowledge base.
This fine-tuning focused only on the q_proj (query) and FFN matrices, adapting the model's reasoning and query-retrieval mechanisms without overwriting its core, frozen knowledge.
This experiment was designed to test the hypothesis that the model's reasoning capabilities (q_proj) could be specialized for math/code while its knowledge (k_proj, v_proj) remained intact.
Quick start
Work in Progress!
Training procedure
This model was trained with SFT.
Framework versions
- PEFT 0.17.1
- TRL: 0.24.0
- Transformers: 4.57.1
- Pytorch: 2.8.0+cu126
- Datasets: 4.2.0
- Tokenizers: 0.22.1
Citations
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}
- Downloads last month
- 1
docker model run hf.co/ethicalabs/xLSTM-7b-Polymath-PEFT