Instructions to use Intelligent-Internet/II-Search-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Intelligent-Internet/II-Search-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Intelligent-Internet/II-Search-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Intelligent-Internet/II-Search-4B") model = AutoModelForCausalLM.from_pretrained("Intelligent-Internet/II-Search-4B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Intelligent-Internet/II-Search-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Intelligent-Internet/II-Search-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Intelligent-Internet/II-Search-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Intelligent-Internet/II-Search-4B
- SGLang
How to use Intelligent-Internet/II-Search-4B 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 "Intelligent-Internet/II-Search-4B" \ --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": "Intelligent-Internet/II-Search-4B", "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 "Intelligent-Internet/II-Search-4B" \ --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": "Intelligent-Internet/II-Search-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Intelligent-Internet/II-Search-4B with Docker Model Runner:
docker model run hf.co/Intelligent-Internet/II-Search-4B
Update README.md
Browse files
README.md
CHANGED
|
@@ -43,6 +43,12 @@ We applied:
|
|
| 43 |
- Filtering to keep only high-quality reasoning traces (correct answers with proper reasoning)
|
| 44 |
- STORM-inspired techniques to enhance comprehensive report generation
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
## Performance
|
| 47 |
|
| 48 |
| **Benchmark** | **Qwen3-4B** | **Jan-4B** | **WebSailor-3B** | **II-Search-4B** |
|
|
@@ -74,13 +80,16 @@ II-Search-4B is designed for:
|
|
| 74 |
|
| 75 |
## Usage
|
| 76 |
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
### Recommended Generation Parameters
|
| 80 |
|
| 81 |
```python
|
| 82 |
generate_cfg = {
|
| 83 |
-
'
|
| 84 |
'top_p': 0.95,
|
| 85 |
'temperature': 0.6,
|
| 86 |
'repetition_penalty': 1.1,
|
|
|
|
| 43 |
- Filtering to keep only high-quality reasoning traces (correct answers with proper reasoning)
|
| 44 |
- STORM-inspired techniques to enhance comprehensive report generation
|
| 45 |
|
| 46 |
+
### Phase 4: Reinforcement Learning
|
| 47 |
+
|
| 48 |
+
We trained the model using reinforcement learning
|
| 49 |
+
- UsedDataset: MuSiQue (19k samples)
|
| 50 |
+
- Incorporated our in-house search database (containing Wiki data, Fineweb data, and arXiv data)
|
| 51 |
+
|
| 52 |
## Performance
|
| 53 |
|
| 54 |
| **Benchmark** | **Qwen3-4B** | **Jan-4B** | **WebSailor-3B** | **II-Search-4B** |
|
|
|
|
| 80 |
|
| 81 |
## Usage
|
| 82 |
|
| 83 |
+
```bash
|
| 84 |
+
vllm serve Intelligent-Internet/II-Search-4B --served-model-name II-Search-4B --tensor-parallel-size 8 --enable-reasoning --reasoning-parser deepseek_r1 --rope-scaling '{"rope_type":"yarn","factor":1.5,"original_max_position_embeddings":98304}' --max-model-len 131072
|
| 85 |
+
```
|
| 86 |
+
- Or you can host the [II-4B-Search-MLX ](https://huggingface.co/Intelligent-Internet/II-Search-4B-MLX/) on your Mac then use LMStudio/ Olama Desktop to use it.
|
| 87 |
|
| 88 |
### Recommended Generation Parameters
|
| 89 |
|
| 90 |
```python
|
| 91 |
generate_cfg = {
|
| 92 |
+
'top_k': 20,
|
| 93 |
'top_p': 0.95,
|
| 94 |
'temperature': 0.6,
|
| 95 |
'repetition_penalty': 1.1,
|