Instructions to use hfunknown/mistral-7b-knapsack-lora-stateless with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hfunknown/mistral-7b-knapsack-lora-stateless with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.3") model = PeftModel.from_pretrained(base_model, "hfunknown/mistral-7b-knapsack-lora-stateless") - Transformers
How to use hfunknown/mistral-7b-knapsack-lora-stateless with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hfunknown/mistral-7b-knapsack-lora-stateless")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hfunknown/mistral-7b-knapsack-lora-stateless", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hfunknown/mistral-7b-knapsack-lora-stateless with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hfunknown/mistral-7b-knapsack-lora-stateless" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hfunknown/mistral-7b-knapsack-lora-stateless", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hfunknown/mistral-7b-knapsack-lora-stateless
- SGLang
How to use hfunknown/mistral-7b-knapsack-lora-stateless 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 "hfunknown/mistral-7b-knapsack-lora-stateless" \ --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": "hfunknown/mistral-7b-knapsack-lora-stateless", "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 "hfunknown/mistral-7b-knapsack-lora-stateless" \ --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": "hfunknown/mistral-7b-knapsack-lora-stateless", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hfunknown/mistral-7b-knapsack-lora-stateless with Docker Model Runner:
docker model run hf.co/hfunknown/mistral-7b-knapsack-lora-stateless
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
base_model: mistralai/Mistral-7B-v0.3
|
| 4 |
+
tags:
|
| 5 |
+
- lora
|
| 6 |
+
- transformers
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# mistral-7b-knapsack-lora-stateless
|
| 11 |
+
|
| 12 |
+
Anonymous supplementary release for a double-blind workshop submission. This is
|
| 13 |
+
one of four LoRA adapters (Mistral-7B-v0.3 / Llama-3.1-8B base model x
|
| 14 |
+
persistent/stateless training regime) fine-tuned on the Opaque Knapsack
|
| 15 |
+
agentic task, extending a prior single-base-model result (see the sibling
|
| 16 |
+
Qwen3-8B release) to a second base model family for the same reproducibility
|
| 17 |
+
review.
|
| 18 |
+
|
| 19 |
+
- **Base model:** [mistralai/Mistral-7B-v0.3](https://huggingface.co/mistralai/Mistral-7B-v0.3)
|
| 20 |
+
- **Training regime:** stateless (trained with a stateless Python interpreter runtime (interpreter state is reset every agent turn))
|
| 21 |
+
- **Seed:** 3407
|
| 22 |
+
|
| 23 |
+
## Training configuration
|
| 24 |
+
|
| 25 |
+
Fine-tuned with [Axolotl](https://github.com/axolotl-ai-cloud/axolotl), LoRA
|
| 26 |
+
adapter, 4-bit NF4 quantized base:
|
| 27 |
+
|
| 28 |
+
| Hyperparameter | Value |
|
| 29 |
+
|---|---|
|
| 30 |
+
| lora_r | 64 |
|
| 31 |
+
| lora_alpha | 128 |
|
| 32 |
+
| lora_dropout | 0.05 |
|
| 33 |
+
| lora_target_modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
|
| 34 |
+
| learning_rate | 1e-4 |
|
| 35 |
+
| lr_scheduler | cosine |
|
| 36 |
+
| optimizer | adamw_torch |
|
| 37 |
+
| epochs | 3.0 |
|
| 38 |
+
| micro_batch_size | 1 |
|
| 39 |
+
| gradient_accumulation_steps | 16 |
|
| 40 |
+
| sequence_len | 16384 |
|
| 41 |
+
| sample_packing | false |
|
| 42 |
+
| seed | 3407 |
|
| 43 |
+
| training data | paired traces for the "stateless" regime (see paper Appendix for pairing/filtering procedure) |
|
| 44 |
+
|
| 45 |
+
Mistral-7B-v0.3 ships no chat_template -- trained with Axolotl's built-in `mistral_v2v3` template; serving/eval uses a hand-written template extending it with system-role support (folded into the next user turn, since `mistral_v2v3` only accepts user/assistant).
|
| 46 |
+
|
| 47 |
+
## Provenance
|
| 48 |
+
|
| 49 |
+
Released anonymously alongside a NeurIPS workshop submission for
|
| 50 |
+
reproducibility review. Non-anonymous release (paper citation, full code, full
|
| 51 |
+
training traces) will follow after the review process concludes.
|