jmisak commited on
Commit
1f1921e
Β·
verified Β·
1 Parent(s): d4abd8e

Upload 4 files

Browse files
Files changed (4) hide show
  1. CHANGELOG.md +11 -9
  2. FREE_MODELS.md +34 -25
  3. README.md +14 -13
  4. llm_backend.py +2 -2
CHANGELOG.md CHANGED
@@ -5,11 +5,12 @@ All notable changes to ConversAI will be documented in this file.
5
  ## [1.1.0] - 2025-11-XX
6
 
7
  ### Changed
8
- - **✨ NEW DEFAULT MODEL**: Switched to Microsoft Phi-3-mini-4k-instruct
9
- - Faster, more reliable on HuggingFace free tier
10
- - Better quality than previous default (Mixtral-8x7B)
11
- - Smaller model = less latency on free tier
12
  - **100% free and ungated** - no approvals needed
 
13
 
14
  - **πŸ†“ FOCUS ON FREE MODELS**: Completely revised to use only free, ungated models
15
  - Removed paid API recommendations (OpenAI, Anthropic)
@@ -24,11 +25,11 @@ All notable changes to ConversAI will be documented in this file.
24
  - Performance benchmarks
25
  - Troubleshooting tips
26
 
27
- - Alternative free model options:
28
  - google/flan-t5-xxl (very fast)
29
- - mistralai/Mistral-7B-Instruct-v0.2 (best quality)
30
  - google/flan-t5-xl (maximum speed)
31
- - google/flan-ul2 (long contexts)
 
32
 
33
  ### Fixed
34
  - Optimized for HuggingFace free tier reliability
@@ -37,8 +38,9 @@ All notable changes to ConversAI will be documented in this file.
37
 
38
  ### Technical Details
39
  - Default model changed in `llm_backend.py` line 69
40
- - From: `mistralai/Mixtral-8x7B-Instruct-v0.1`
41
- - To: `microsoft/Phi-3-mini-4k-instruct`
 
42
 
43
  ---
44
 
 
5
  ## [1.1.0] - 2025-11-XX
6
 
7
  ### Changed
8
+ - **✨ NEW DEFAULT MODEL**: Switched to Mistral-7B-Instruct-v0.2
9
+ - **Verified working** on HuggingFace Inference API
10
+ - Excellent quality for professional survey work
11
+ - Actively deployed and maintained
12
  - **100% free and ungated** - no approvals needed
13
+ - Previous model (Phi-3) not deployed on Inference API
14
 
15
  - **πŸ†“ FOCUS ON FREE MODELS**: Completely revised to use only free, ungated models
16
  - Removed paid API recommendations (OpenAI, Anthropic)
 
25
  - Performance benchmarks
26
  - Troubleshooting tips
27
 
28
+ - Alternative free model options (verified deployed):
29
  - google/flan-t5-xxl (very fast)
 
30
  - google/flan-t5-xl (maximum speed)
31
+ - meta-llama/Llama-2-7b-chat-hf (alternative)
32
+ - **Note**: Only use models verified as "Deployed" on HF Inference API
33
 
34
  ### Fixed
35
  - Optimized for HuggingFace free tier reliability
 
38
 
39
  ### Technical Details
40
  - Default model changed in `llm_backend.py` line 69
41
+ - From: `mistralai/Mixtral-8x7B-Instruct-v0.1` (not deployed)
42
+ - To: `mistralai/Mistral-7B-Instruct-v0.2` (verified deployed)
43
+ - Reason: Phi-3 initially chosen but not available on Inference API
44
 
45
  ---
46
 
FREE_MODELS.md CHANGED
@@ -4,11 +4,15 @@
4
 
5
  ---
6
 
 
 
 
 
7
  ## ✨ TL;DR
8
 
9
- **Default model (Phi-3) works great!** Just deploy and use. No configuration needed.
10
 
11
- Want to try others? Set `LLM_MODEL` environment variable to any model below.
12
 
13
  ---
14
 
@@ -19,34 +23,38 @@ All models below are:
19
  - βœ… **Ungated** - No approval needed
20
  - βœ… **Works on HuggingFace Spaces** - Ready to use
21
 
22
- ### 1. Microsoft Phi-3-mini-4k-instruct ⭐ (DEFAULT)
23
 
24
- **Best for:** General use, balanced performance
25
 
26
  ```bash
27
- LLM_MODEL=microsoft/Phi-3-mini-4k-instruct
28
  ```
29
 
30
  **Specs:**
31
- - Speed: ⚑⚑ Fast (10-30 seconds)
32
- - Quality: ⭐⭐⭐ Good
33
- - Size: 3.8B parameters (small, efficient)
34
- - Context: 4K tokens
 
35
 
36
  **Pros:**
37
- - Fast and reliable
38
- - Good at following instructions
39
- - Low latency on free tier
40
- - Balanced quality/speed
 
41
 
42
  **Cons:**
43
- - May struggle with very complex analysis
44
- - Limited context window (4K)
 
45
 
46
  **Best for:**
47
- - Survey generation (5-15 questions)
48
- - Quick translations (1-3 languages)
49
- - Basic analysis (20-50 responses)
 
50
 
51
  ---
52
 
@@ -182,13 +190,14 @@ LLM_MODEL=google/flan-ul2
182
 
183
  ## πŸ“Š Model Comparison
184
 
185
- | Model | Speed | Quality | Size | Best Use Case |
186
- |-------|-------|---------|------|---------------|
187
- | **Phi-3-mini** ⭐ | ⚑⚑ Fast | ⭐⭐⭐ Good | 3.8B | **Default - balanced** |
188
- | **Flan-T5-XXL** | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | 11B | **Speed priority** |
189
- | **Mistral-7B** | ⚑ Slow | ⭐⭐⭐⭐ Excellent | 7B | **Quality priority** |
190
- | **Flan-T5-XL** | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | 3B | **Maximum speed** |
191
- | **Flan-UL2** | ⚑⚑ Fast | ⭐⭐⭐ Good | 20B | **Long contexts** |
 
192
 
193
  ---
194
 
 
4
 
5
  ---
6
 
7
+ > **⚠️ IMPORTANT:** Only models marked as "βœ… Deployed" are actively available on HuggingFace Inference API. Others may return 404 errors. **Default (Mistral-7B) is verified working.**
8
+
9
+ ---
10
+
11
  ## ✨ TL;DR
12
 
13
+ **Default model (Mistral-7B) works great!** Just deploy and use. No configuration needed.
14
 
15
+ Want to try others? Set `LLM_MODEL` environment variable to any verified model below.
16
 
17
  ---
18
 
 
23
  - βœ… **Ungated** - No approval needed
24
  - βœ… **Works on HuggingFace Spaces** - Ready to use
25
 
26
+ ### 1. Mistral-7B-Instruct-v0.2 ⭐ (DEFAULT)
27
 
28
+ **Best for:** General use, best quality on free tier
29
 
30
  ```bash
31
+ LLM_MODEL=mistralai/Mistral-7B-Instruct-v0.2
32
  ```
33
 
34
  **Specs:**
35
+ - Speed: ⚑⚑ Medium (20-45 seconds)
36
+ - Quality: ⭐⭐⭐⭐ Excellent
37
+ - Size: 7B parameters
38
+ - Context: 8K tokens
39
+ - Status: βœ… **Actively deployed on HF Inference API**
40
 
41
  **Pros:**
42
+ - **Best quality among free ungated models**
43
+ - Excellent instruction following
44
+ - Good reasoning capabilities
45
+ - Handles complex tasks well
46
+ - Actively maintained and deployed
47
 
48
  **Cons:**
49
+ - Slower than smaller models
50
+ - May queue during peak times
51
+ - First request can take 60+ seconds (cold start)
52
 
53
  **Best for:**
54
+ - Professional survey generation
55
+ - High-quality translations
56
+ - Detailed analysis (50+ responses)
57
+ - When quality matters most
58
 
59
  ---
60
 
 
190
 
191
  ## πŸ“Š Model Comparison
192
 
193
+ | Model | Speed | Quality | Size | Deployed | Best Use Case |
194
+ |-------|-------|---------|------|----------|---------------|
195
+ | **Mistral-7B** ⭐ | ⚑⚑ Medium | ⭐⭐⭐⭐ Excellent | 7B | βœ… Yes | **Default - best quality** |
196
+ | **Flan-T5-XXL** | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | 11B | βœ… Yes | **Speed priority** |
197
+ | **Flan-T5-XL** | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | 3B | βœ… Yes | **Maximum speed** |
198
+ | **Llama-2-7b-chat** | ⚑⚑ Medium | ⭐⭐⭐ Good | 7B | βœ… Yes | **Alternative option** |
199
+
200
+ **Note:** Only models with "βœ… Yes" in Deployed column are currently available on HF Inference API.
201
 
202
  ---
203
 
README.md CHANGED
@@ -16,7 +16,7 @@ Battle the blank page, reach global audiences, and uncover insights with AI assi
16
 
17
  ---
18
 
19
- > **✨ NEW (Nov 2025):** Now uses **Microsoft Phi-3** - Faster, reliable, and **completely FREE** on HuggingFace!
20
 
21
  ---
22
 
@@ -57,12 +57,12 @@ Battle the blank page, reach global audiences, and uncover insights with AI assi
57
 
58
  **✨ Zero configuration needed!** ConversAI works out-of-the-box on HuggingFace Spaces.
59
 
60
- **Default Model:** Microsoft Phi-3-mini-4k-instruct
61
  - βœ… **100% Free** - No API keys, no costs, ever
62
- - βœ… **Fast** - Optimized for speed (10-30 seconds)
63
  - βœ… **Ungated** - No approval needed, works immediately
64
- - βœ… **Good Quality** - Suitable for professional survey work
65
- - βœ… **Reliable** - Stable on HuggingFace Inference API
66
 
67
  **Setup for PUBLIC Spaces (Recommended):**
68
  - Just deploy - uses built-in `HF_TOKEN` automatically
@@ -80,15 +80,16 @@ Battle the blank page, reach global audiences, and uncover insights with AI assi
80
 
81
  You can try different free models by setting the `LLM_MODEL` environment variable:
82
 
83
- **Recommended Free Models:**
84
 
85
- | Model | Best For | Speed | Quality | Ungated |
86
- |-------|----------|-------|---------|---------|
87
- | **microsoft/Phi-3-mini-4k-instruct** (default) | General use, balanced | ⚑⚑ Fast | ⭐⭐⭐ Good | βœ… Yes |
88
- | **google/flan-t5-xxl** | Fast responses, instructions | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | βœ… Yes |
89
- | **mistralai/Mistral-7B-Instruct-v0.2** | Best quality (slower) | ⚑ Slower | ⭐⭐⭐⭐ Excellent | βœ… Yes |
90
- | **google/flan-t5-xl** | Maximum speed | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | βœ… Yes |
91
- | **google/flan-ul2** | Long contexts | ⚑⚑ Fast | ⭐⭐⭐ Good | βœ… Yes |
 
92
 
93
  **To change model:**
94
  ```bash
 
16
 
17
  ---
18
 
19
+ > **✨ UPDATED (Nov 2025):** Now uses **Mistral-7B-Instruct** - High quality, reliable, and **completely FREE** on HuggingFace!
20
 
21
  ---
22
 
 
57
 
58
  **✨ Zero configuration needed!** ConversAI works out-of-the-box on HuggingFace Spaces.
59
 
60
+ **Default Model:** Mistral-7B-Instruct-v0.2
61
  - βœ… **100% Free** - No API keys, no costs, ever
62
+ - βœ… **High Quality** - Excellent output for professional work (20-45 seconds)
63
  - βœ… **Ungated** - No approval needed, works immediately
64
+ - βœ… **Proven** - Popular model, stable on HuggingFace Inference API
65
+ - βœ… **Reliable** - Actively deployed and maintained
66
 
67
  **Setup for PUBLIC Spaces (Recommended):**
68
  - Just deploy - uses built-in `HF_TOKEN` automatically
 
80
 
81
  You can try different free models by setting the `LLM_MODEL` environment variable:
82
 
83
+ **Recommended Free Models (Verified on HF Inference API):**
84
 
85
+ | Model | Best For | Speed | Quality | Status |
86
+ |-------|----------|-------|---------|--------|
87
+ | **mistralai/Mistral-7B-Instruct-v0.2** (default) | Best quality, general use | ⚑⚑ Medium | ⭐⭐⭐⭐ Excellent | βœ… Deployed |
88
+ | **google/flan-t5-xxl** | Fast responses | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | βœ… Deployed |
89
+ | **google/flan-t5-xl** | Maximum speed | ⚑⚑⚑ Very Fast | ⭐⭐ Decent | βœ… Deployed |
90
+ | **meta-llama/Llama-2-7b-chat-hf** | Alternative quality | ⚑⚑ Medium | ⭐⭐⭐ Good | βœ… Deployed |
91
+
92
+ **Note:** Only use models marked as "Deployed" - others may not be available on the free Inference API.
93
 
94
  **To change model:**
95
  ```bash
llm_backend.py CHANGED
@@ -65,8 +65,8 @@ class LLMBackend:
65
  defaults = {
66
  LLMProvider.OPENAI: "gpt-4o-mini",
67
  LLMProvider.ANTHROPIC: "claude-3-5-sonnet-20241022",
68
- # Using Phi-3 - smaller, faster, free, ungated
69
- LLMProvider.HUGGINGFACE: "microsoft/Phi-3-mini-4k-instruct",
70
  LLMProvider.LM_STUDIO: "google/gemma-3-27b"
71
  }
72
  return os.getenv("LLM_MODEL", defaults[self.provider])
 
65
  defaults = {
66
  LLMProvider.OPENAI: "gpt-4o-mini",
67
  LLMProvider.ANTHROPIC: "claude-3-5-sonnet-20241022",
68
+ # Using Mistral-7B - proven to work on HF Inference API, free, ungated
69
+ LLMProvider.HUGGINGFACE: "mistralai/Mistral-7B-Instruct-v0.2",
70
  LLMProvider.LM_STUDIO: "google/gemma-3-27b"
71
  }
72
  return os.getenv("LLM_MODEL", defaults[self.provider])