Text Generation
Transformers
Safetensors
English
qwen2
text-generation-inference
unsloth
trl
sft
conversational
Instructions to use januverma/GenRec-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use januverma/GenRec-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="januverma/GenRec-7B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("januverma/GenRec-7B-Instruct") model = AutoModelForCausalLM.from_pretrained("januverma/GenRec-7B-Instruct") 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 januverma/GenRec-7B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "januverma/GenRec-7B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "januverma/GenRec-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/januverma/GenRec-7B-Instruct
- SGLang
How to use januverma/GenRec-7B-Instruct 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 "januverma/GenRec-7B-Instruct" \ --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": "januverma/GenRec-7B-Instruct", "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 "januverma/GenRec-7B-Instruct" \ --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": "januverma/GenRec-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use januverma/GenRec-7B-Instruct 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 januverma/GenRec-7B-Instruct 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 januverma/GenRec-7B-Instruct to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for januverma/GenRec-7B-Instruct to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="januverma/GenRec-7B-Instruct", max_seq_length=2048, ) - Docker Model Runner
How to use januverma/GenRec-7B-Instruct with Docker Model Runner:
docker model run hf.co/januverma/GenRec-7B-Instruct
Trained with Unsloth
Browse files- README.md +1 -0
- config.json +2 -3
- generation_config.json +1 -1
- model-00001-of-00004.safetensors +1 -1
- model-00002-of-00004.safetensors +1 -1
- model-00003-of-00004.safetensors +1 -1
README.md
CHANGED
|
@@ -6,6 +6,7 @@ tags:
|
|
| 6 |
- unsloth
|
| 7 |
- qwen2
|
| 8 |
- trl
|
|
|
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
- en
|
|
|
|
| 6 |
- unsloth
|
| 7 |
- qwen2
|
| 8 |
- trl
|
| 9 |
+
- sft
|
| 10 |
license: apache-2.0
|
| 11 |
language:
|
| 12 |
- en
|
config.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "unsloth/qwen2.5-7b-instruct-unsloth-bnb-4bit",
|
| 3 |
"architectures": [
|
| 4 |
"Qwen2ForCausalLM"
|
| 5 |
],
|
|
@@ -22,9 +21,9 @@
|
|
| 22 |
"sliding_window": null,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
-
"transformers_version": "4.
|
| 26 |
"unsloth_fixed": true,
|
| 27 |
-
"unsloth_version": "2025.3.
|
| 28 |
"use_cache": true,
|
| 29 |
"use_sliding_window": false,
|
| 30 |
"vocab_size": 152064
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"Qwen2ForCausalLM"
|
| 4 |
],
|
|
|
|
| 21 |
"sliding_window": null,
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
+
"transformers_version": "4.50.3",
|
| 25 |
"unsloth_fixed": true,
|
| 26 |
+
"unsloth_version": "2025.3.19",
|
| 27 |
"use_cache": true,
|
| 28 |
"use_sliding_window": false,
|
| 29 |
"vocab_size": 152064
|
generation_config.json
CHANGED
|
@@ -11,5 +11,5 @@
|
|
| 11 |
"temperature": 0.7,
|
| 12 |
"top_k": 20,
|
| 13 |
"top_p": 0.8,
|
| 14 |
-
"transformers_version": "4.
|
| 15 |
}
|
|
|
|
| 11 |
"temperature": 0.7,
|
| 12 |
"top_k": 20,
|
| 13 |
"top_p": 0.8,
|
| 14 |
+
"transformers_version": "4.50.3"
|
| 15 |
}
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4877660776
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8fb69078f223718cf4039d049bab96f746f76de5ccf6921bb2304cbcd6e28a99
|
| 3 |
size 4877660776
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4932751008
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17872a42dd8e47b6b4ac71fea8ac39579c0461732f2aa36ded7e6ca14c33efa6
|
| 3 |
size 4932751008
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4330865200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96e23e58df0bc8db1521a665e8ea1c2bdc6e7d73bf63ebbbcf86bf3584ad39b9
|
| 3 |
size 4330865200
|