Text Generation
Transformers
Safetensors
low_rank_compressed
low-rank
compressed
kfac_svd
uniform
params-0.9
conversational
custom_code
Instructions to use MoritzMo123/kfac-svd_uniform_mistral-7b_0.9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MoritzMo123/kfac-svd_uniform_mistral-7b_0.9 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MoritzMo123/kfac-svd_uniform_mistral-7b_0.9", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MoritzMo123/kfac-svd_uniform_mistral-7b_0.9", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MoritzMo123/kfac-svd_uniform_mistral-7b_0.9 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MoritzMo123/kfac-svd_uniform_mistral-7b_0.9" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MoritzMo123/kfac-svd_uniform_mistral-7b_0.9", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MoritzMo123/kfac-svd_uniform_mistral-7b_0.9
- SGLang
How to use MoritzMo123/kfac-svd_uniform_mistral-7b_0.9 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 "MoritzMo123/kfac-svd_uniform_mistral-7b_0.9" \ --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": "MoritzMo123/kfac-svd_uniform_mistral-7b_0.9", "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 "MoritzMo123/kfac-svd_uniform_mistral-7b_0.9" \ --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": "MoritzMo123/kfac-svd_uniform_mistral-7b_0.9", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MoritzMo123/kfac-svd_uniform_mistral-7b_0.9 with Docker Model Runner:
docker model run hf.co/MoritzMo123/kfac-svd_uniform_mistral-7b_0.9
| { | |
| "auto_map": { | |
| "AutoConfig": "configuration_low_rank.LowRankConfig", | |
| "AutoModelForCausalLM": "modeling_low_rank.LowRankCausalLM" | |
| }, | |
| "base_config": { | |
| "_name_or_path": "unsloth/mistral-7b", | |
| "add_cross_attention": false, | |
| "architectures": [ | |
| "MistralForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bad_words_ids": null, | |
| "begin_suppress_tokens": null, | |
| "bos_token_id": 1, | |
| "chunk_size_feed_forward": 0, | |
| "cross_attention_hidden_size": null, | |
| "decoder_start_token_id": null, | |
| "diversity_penalty": 0.0, | |
| "do_sample": false, | |
| "dtype": "float16", | |
| "early_stopping": false, | |
| "encoder_no_repeat_ngram_size": 0, | |
| "eos_token_id": 2, | |
| "exponential_decay_length_penalty": null, | |
| "finetuning_task": null, | |
| "forced_bos_token_id": null, | |
| "forced_eos_token_id": null, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 4096, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 14336, | |
| "is_decoder": false, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "length_penalty": 1.0, | |
| "max_length": 20, | |
| "max_position_embeddings": 32768, | |
| "min_length": 0, | |
| "model_type": "mistral", | |
| "no_repeat_ngram_size": 0, | |
| "num_attention_heads": 32, | |
| "num_beam_groups": 1, | |
| "num_beams": 1, | |
| "num_hidden_layers": 32, | |
| "num_key_value_heads": 8, | |
| "num_return_sequences": 1, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "output_scores": false, | |
| "pad_token_id": 0, | |
| "prefix": null, | |
| "problem_type": null, | |
| "pruned_heads": {}, | |
| "remove_invalid_values": false, | |
| "repetition_penalty": 1.0, | |
| "return_dict": true, | |
| "return_dict_in_generate": false, | |
| "rms_norm_eps": 1e-05, | |
| "rope_theta": 10000.0, | |
| "sep_token_id": null, | |
| "sliding_window": 4096, | |
| "suppress_tokens": null, | |
| "task_specific_params": null, | |
| "temperature": 1.0, | |
| "tf_legacy_loss": false, | |
| "tie_encoder_decoder": false, | |
| "tie_word_embeddings": false, | |
| "tokenizer_class": null, | |
| "top_k": 50, | |
| "top_p": 1.0, | |
| "torch_dtype": "float16", | |
| "torchscript": false, | |
| "transformers_version": "4.55.0", | |
| "typical_p": 1.0, | |
| "unsloth_version": "2024.9", | |
| "use_bfloat16": false, | |
| "use_cache": true, | |
| "vocab_size": 32000 | |
| }, | |
| "base_model_id": "unsloth/mistral-7b", | |
| "base_model_type": "mistral", | |
| "compression_method": "kfac_svd", | |
| "dtype": "float16", | |
| "model_type": "low_rank_compressed", | |
| "rank_dict": { | |
| "model.layers.0.mlp.down_proj": 2866, | |
| "model.layers.0.mlp.gate_proj": 2866, | |
| "model.layers.0.mlp.up_proj": 2866, | |
| "model.layers.0.self_attn.k_proj": 737, | |
| "model.layers.0.self_attn.o_proj": 1843, | |
| "model.layers.0.self_attn.q_proj": 1843, | |
| "model.layers.0.self_attn.v_proj": 737, | |
| "model.layers.1.mlp.down_proj": 2866, | |
| "model.layers.1.mlp.gate_proj": 2866, | |
| "model.layers.1.mlp.up_proj": 2866, | |
| "model.layers.1.self_attn.k_proj": 737, | |
| "model.layers.1.self_attn.o_proj": 1843, | |
| "model.layers.1.self_attn.q_proj": 1843, | |
| "model.layers.1.self_attn.v_proj": 737, | |
| "model.layers.10.mlp.down_proj": 2866, | |
| "model.layers.10.mlp.gate_proj": 2866, | |
| "model.layers.10.mlp.up_proj": 2866, | |
| "model.layers.10.self_attn.k_proj": 737, | |
| "model.layers.10.self_attn.o_proj": 1843, | |
| "model.layers.10.self_attn.q_proj": 1843, | |
| "model.layers.10.self_attn.v_proj": 737, | |
| "model.layers.11.mlp.down_proj": 2866, | |
| "model.layers.11.mlp.gate_proj": 2866, | |
| "model.layers.11.mlp.up_proj": 2866, | |
| "model.layers.11.self_attn.k_proj": 737, | |
| "model.layers.11.self_attn.o_proj": 1843, | |
| "model.layers.11.self_attn.q_proj": 1843, | |
| "model.layers.11.self_attn.v_proj": 737, | |
| "model.layers.12.mlp.down_proj": 2866, | |
| "model.layers.12.mlp.gate_proj": 2866, | |
| "model.layers.12.mlp.up_proj": 2866, | |
| "model.layers.12.self_attn.k_proj": 737, | |
| "model.layers.12.self_attn.o_proj": 1843, | |
| "model.layers.12.self_attn.q_proj": 1843, | |
| "model.layers.12.self_attn.v_proj": 737, | |
| "model.layers.13.mlp.down_proj": 2866, | |
| "model.layers.13.mlp.gate_proj": 2866, | |
| "model.layers.13.mlp.up_proj": 2866, | |
| "model.layers.13.self_attn.k_proj": 737, | |
| "model.layers.13.self_attn.o_proj": 1843, | |
| "model.layers.13.self_attn.q_proj": 1843, | |
| "model.layers.13.self_attn.v_proj": 737, | |
| "model.layers.14.mlp.down_proj": 2866, | |
| "model.layers.14.mlp.gate_proj": 2866, | |
| "model.layers.14.mlp.up_proj": 2866, | |
| "model.layers.14.self_attn.k_proj": 737, | |
| "model.layers.14.self_attn.o_proj": 1843, | |
| "model.layers.14.self_attn.q_proj": 1843, | |
| "model.layers.14.self_attn.v_proj": 737, | |
| "model.layers.15.mlp.down_proj": 2866, | |
| "model.layers.15.mlp.gate_proj": 2866, | |
| "model.layers.15.mlp.up_proj": 2866, | |
| "model.layers.15.self_attn.k_proj": 737, | |
| "model.layers.15.self_attn.o_proj": 1843, | |
| "model.layers.15.self_attn.q_proj": 1843, | |
| "model.layers.15.self_attn.v_proj": 737, | |
| "model.layers.16.mlp.down_proj": 2866, | |
| "model.layers.16.mlp.gate_proj": 2866, | |
| "model.layers.16.mlp.up_proj": 2866, | |
| "model.layers.16.self_attn.k_proj": 737, | |
| "model.layers.16.self_attn.o_proj": 1843, | |
| "model.layers.16.self_attn.q_proj": 1843, | |
| "model.layers.16.self_attn.v_proj": 737, | |
| "model.layers.17.mlp.down_proj": 2866, | |
| "model.layers.17.mlp.gate_proj": 2866, | |
| "model.layers.17.mlp.up_proj": 2866, | |
| "model.layers.17.self_attn.k_proj": 737, | |
| "model.layers.17.self_attn.o_proj": 1843, | |
| "model.layers.17.self_attn.q_proj": 1843, | |
| "model.layers.17.self_attn.v_proj": 737, | |
| "model.layers.18.mlp.down_proj": 2866, | |
| "model.layers.18.mlp.gate_proj": 2866, | |
| "model.layers.18.mlp.up_proj": 2866, | |
| "model.layers.18.self_attn.k_proj": 737, | |
| "model.layers.18.self_attn.o_proj": 1843, | |
| "model.layers.18.self_attn.q_proj": 1843, | |
| "model.layers.18.self_attn.v_proj": 737, | |
| "model.layers.19.mlp.down_proj": 2866, | |
| "model.layers.19.mlp.gate_proj": 2866, | |
| "model.layers.19.mlp.up_proj": 2866, | |
| "model.layers.19.self_attn.k_proj": 737, | |
| "model.layers.19.self_attn.o_proj": 1843, | |
| "model.layers.19.self_attn.q_proj": 1843, | |
| "model.layers.19.self_attn.v_proj": 737, | |
| "model.layers.2.mlp.down_proj": 2866, | |
| "model.layers.2.mlp.gate_proj": 2866, | |
| "model.layers.2.mlp.up_proj": 2866, | |
| "model.layers.2.self_attn.k_proj": 737, | |
| "model.layers.2.self_attn.o_proj": 1843, | |
| "model.layers.2.self_attn.q_proj": 1843, | |
| "model.layers.2.self_attn.v_proj": 737, | |
| "model.layers.20.mlp.down_proj": 2866, | |
| "model.layers.20.mlp.gate_proj": 2866, | |
| "model.layers.20.mlp.up_proj": 2866, | |
| "model.layers.20.self_attn.k_proj": 737, | |
| "model.layers.20.self_attn.o_proj": 1843, | |
| "model.layers.20.self_attn.q_proj": 1843, | |
| "model.layers.20.self_attn.v_proj": 737, | |
| "model.layers.21.mlp.down_proj": 2866, | |
| "model.layers.21.mlp.gate_proj": 2866, | |
| "model.layers.21.mlp.up_proj": 2866, | |
| "model.layers.21.self_attn.k_proj": 737, | |
| "model.layers.21.self_attn.o_proj": 1843, | |
| "model.layers.21.self_attn.q_proj": 1843, | |
| "model.layers.21.self_attn.v_proj": 737, | |
| "model.layers.22.mlp.down_proj": 2866, | |
| "model.layers.22.mlp.gate_proj": 2866, | |
| "model.layers.22.mlp.up_proj": 2866, | |
| "model.layers.22.self_attn.k_proj": 737, | |
| "model.layers.22.self_attn.o_proj": 1843, | |
| "model.layers.22.self_attn.q_proj": 1843, | |
| "model.layers.22.self_attn.v_proj": 737, | |
| "model.layers.23.mlp.down_proj": 2866, | |
| "model.layers.23.mlp.gate_proj": 2866, | |
| "model.layers.23.mlp.up_proj": 2866, | |
| "model.layers.23.self_attn.k_proj": 737, | |
| "model.layers.23.self_attn.o_proj": 1843, | |
| "model.layers.23.self_attn.q_proj": 1843, | |
| "model.layers.23.self_attn.v_proj": 737, | |
| "model.layers.24.mlp.down_proj": 2866, | |
| "model.layers.24.mlp.gate_proj": 2866, | |
| "model.layers.24.mlp.up_proj": 2866, | |
| "model.layers.24.self_attn.k_proj": 737, | |
| "model.layers.24.self_attn.o_proj": 1843, | |
| "model.layers.24.self_attn.q_proj": 1843, | |
| "model.layers.24.self_attn.v_proj": 737, | |
| "model.layers.25.mlp.down_proj": 2866, | |
| "model.layers.25.mlp.gate_proj": 2866, | |
| "model.layers.25.mlp.up_proj": 2866, | |
| "model.layers.25.self_attn.k_proj": 737, | |
| "model.layers.25.self_attn.o_proj": 1843, | |
| "model.layers.25.self_attn.q_proj": 1843, | |
| "model.layers.25.self_attn.v_proj": 737, | |
| "model.layers.26.mlp.down_proj": 2866, | |
| "model.layers.26.mlp.gate_proj": 2866, | |
| "model.layers.26.mlp.up_proj": 2866, | |
| "model.layers.26.self_attn.k_proj": 737, | |
| "model.layers.26.self_attn.o_proj": 1843, | |
| "model.layers.26.self_attn.q_proj": 1843, | |
| "model.layers.26.self_attn.v_proj": 737, | |
| "model.layers.27.mlp.down_proj": 2866, | |
| "model.layers.27.mlp.gate_proj": 2866, | |
| "model.layers.27.mlp.up_proj": 2866, | |
| "model.layers.27.self_attn.k_proj": 737, | |
| "model.layers.27.self_attn.o_proj": 1843, | |
| "model.layers.27.self_attn.q_proj": 1843, | |
| "model.layers.27.self_attn.v_proj": 737, | |
| "model.layers.28.mlp.down_proj": 2866, | |
| "model.layers.28.mlp.gate_proj": 2866, | |
| "model.layers.28.mlp.up_proj": 2866, | |
| "model.layers.28.self_attn.k_proj": 737, | |
| "model.layers.28.self_attn.o_proj": 1843, | |
| "model.layers.28.self_attn.q_proj": 1843, | |
| "model.layers.28.self_attn.v_proj": 737, | |
| "model.layers.29.mlp.down_proj": 2866, | |
| "model.layers.29.mlp.gate_proj": 2866, | |
| "model.layers.29.mlp.up_proj": 2866, | |
| "model.layers.29.self_attn.k_proj": 737, | |
| "model.layers.29.self_attn.o_proj": 1843, | |
| "model.layers.29.self_attn.q_proj": 1843, | |
| "model.layers.29.self_attn.v_proj": 737, | |
| "model.layers.3.mlp.down_proj": 2866, | |
| "model.layers.3.mlp.gate_proj": 2866, | |
| "model.layers.3.mlp.up_proj": 2866, | |
| "model.layers.3.self_attn.k_proj": 737, | |
| "model.layers.3.self_attn.o_proj": 1843, | |
| "model.layers.3.self_attn.q_proj": 1843, | |
| "model.layers.3.self_attn.v_proj": 737, | |
| "model.layers.30.mlp.down_proj": 2866, | |
| "model.layers.30.mlp.gate_proj": 2866, | |
| "model.layers.30.mlp.up_proj": 2866, | |
| "model.layers.30.self_attn.k_proj": 737, | |
| "model.layers.30.self_attn.o_proj": 1843, | |
| "model.layers.30.self_attn.q_proj": 1843, | |
| "model.layers.30.self_attn.v_proj": 737, | |
| "model.layers.31.mlp.down_proj": 2866, | |
| "model.layers.31.mlp.gate_proj": 2866, | |
| "model.layers.31.mlp.up_proj": 2866, | |
| "model.layers.31.self_attn.k_proj": 737, | |
| "model.layers.31.self_attn.o_proj": 1843, | |
| "model.layers.31.self_attn.q_proj": 1843, | |
| "model.layers.31.self_attn.v_proj": 737, | |
| "model.layers.4.mlp.down_proj": 2866, | |
| "model.layers.4.mlp.gate_proj": 2866, | |
| "model.layers.4.mlp.up_proj": 2866, | |
| "model.layers.4.self_attn.k_proj": 737, | |
| "model.layers.4.self_attn.o_proj": 1843, | |
| "model.layers.4.self_attn.q_proj": 1843, | |
| "model.layers.4.self_attn.v_proj": 737, | |
| "model.layers.5.mlp.down_proj": 2866, | |
| "model.layers.5.mlp.gate_proj": 2866, | |
| "model.layers.5.mlp.up_proj": 2866, | |
| "model.layers.5.self_attn.k_proj": 737, | |
| "model.layers.5.self_attn.o_proj": 1843, | |
| "model.layers.5.self_attn.q_proj": 1843, | |
| "model.layers.5.self_attn.v_proj": 737, | |
| "model.layers.6.mlp.down_proj": 2866, | |
| "model.layers.6.mlp.gate_proj": 2866, | |
| "model.layers.6.mlp.up_proj": 2866, | |
| "model.layers.6.self_attn.k_proj": 737, | |
| "model.layers.6.self_attn.o_proj": 1843, | |
| "model.layers.6.self_attn.q_proj": 1843, | |
| "model.layers.6.self_attn.v_proj": 737, | |
| "model.layers.7.mlp.down_proj": 2866, | |
| "model.layers.7.mlp.gate_proj": 2866, | |
| "model.layers.7.mlp.up_proj": 2866, | |
| "model.layers.7.self_attn.k_proj": 737, | |
| "model.layers.7.self_attn.o_proj": 1843, | |
| "model.layers.7.self_attn.q_proj": 1843, | |
| "model.layers.7.self_attn.v_proj": 737, | |
| "model.layers.8.mlp.down_proj": 2866, | |
| "model.layers.8.mlp.gate_proj": 2866, | |
| "model.layers.8.mlp.up_proj": 2866, | |
| "model.layers.8.self_attn.k_proj": 737, | |
| "model.layers.8.self_attn.o_proj": 1843, | |
| "model.layers.8.self_attn.q_proj": 1843, | |
| "model.layers.8.self_attn.v_proj": 737, | |
| "model.layers.9.mlp.down_proj": 2866, | |
| "model.layers.9.mlp.gate_proj": 2866, | |
| "model.layers.9.mlp.up_proj": 2866, | |
| "model.layers.9.self_attn.k_proj": 737, | |
| "model.layers.9.self_attn.o_proj": 1843, | |
| "model.layers.9.self_attn.q_proj": 1843, | |
| "model.layers.9.self_attn.v_proj": 737 | |
| }, | |
| "target_ratio": 0.9, | |
| "torch_dtype": "float16", | |
| "transformers_version": "4.55.0" | |
| } | |