Does a lisse $\ell$-adic sheaf give rise to an affine group scheme? Let $k$ be a finitely generated field, $\ell$ a prime different from the characteristic of $k$, $S$ a $k$-variety, and $\mathcal{V}$ a lisse $\ell$-adic sheaf on $S$. Fix an algebraic closure $\bar{k}$ of $k$. Let $\bar{S}$ (resp. $\bar{\mathcal{V}}$) denote the pull-back of $S$ (resp. $\mathcal{V}$) to $\bar{k}$.
Every point $\bar{s} \in \bar{S}$ with image $s \in S$ gives rise to a Galois representation $\mathrm{Gal}(\bar{s}/s) \to \mathrm{GL}(\bar{\mathcal{V}}_{\bar{s}})$. Denote the connected component of the Zariski closure of the image of this representation with $G_{\bar{s}}$.
My previous question was heavily confused:

Are the linear algebraic groups $G_{\bar{s}}$ the geometric fibres of an affine group scheme $G \to S$?

I have some slight doubts, because $G \to S$ cannot be flat (the dimensions of the $G_{\bar{s}}$ may vary). But I think this is just because I have never worked with non-flat group schemes before, so I hope for a positive answer!
Of course the groups $G_{\bar{s}}$ are groups over $\mathbb{Q}_{\ell}$, and not over $\bar{s}$. So now for a more vague question:

The algebraic groups $G_{\bar{s}}$ are in some sense parameterised by $S$ (or $\bar{S}$). Is there any way to make this notion more precise? Can we express $(G_{\bar{s}})_{\bar{s}}$ as a family of algebraic groups?

 A: I don't really know how to answer the question in a meaningful way, but let me make a few remarks about the parallel situation for Hodge theory. Suppose that
$S$ is a smooth complex algebraic variety, and that $V$ is a polarizable variation of Hodge structure over  $S$ (e.g. $V= R^if_*\mathbb{Q}$ for a smooth projective family $f:X\to S$). Attached to each $s\in S$, one has the Mumford-Tate group $MT_s$ of the Hodge structure $V_s$.  What one can say about this family is that there exists a countable union of proper algebraic subvarieties $Z\subset S$ such that $G_s$ is the same for all $s\in S-Z$. This follows from a theorem of Cattani, Deligne, Kaplan together with some standard arguments. 
The argument can repeated to obtain a partition $S-Z, Z-Z', \ldots$ of $S$, so that $MT_s$ is constant along strata, but can "jump" across strata.  I'm not sure how to make that the last part precise.
At least conjecturally, in the geometric case, the $\mathbb{Q}_\ell$ points of $MT_s$ are same as the $G_s$ in your question. So I guess this is some sort of an answer.
A: If $V_n$ is a locally constant sheaf of $\mathbb{Z}/\ell^n\mathbb{Z}$-modules of finite rank over $S$ in the etale toplogy, then it is representable by a scheme $X_n$ which is affine over $S$. (Etale locally, it is representable by Spec of the product of finitely many copies of the structure sheaf with itself. Then apply descent for quasi-coherent sheaves.) Write $X_n=\mathrm{Spec}(A_n)$, where $A_n$ is a vector bundle on $S$ with an algebra structure. Therefore any limit of the form $V=\lim_n V_n$ is representable by $\mathrm{Spec}(A)$, where $A=\mathrm{colim}_n A_n$. In particular, $V$ is representable by an affine group scheme over $S$. (It won't typically be finite or even of finite type, but it will be pro-finite over $S$, by construction.)
Is this what you're looking for? 
A: Let $S$ be a modular curve and let $\mathcal V$ be the sheaf of Tate modules of the universal elliptic curve over $S$. (In other words $R^1 \pi_* \mathbb Q_\ell$, where $\pi$ is the structure sheaf of this family.) Then $G_s = GL_2(\mathbb Q_\ell)$, unless $s$ is a CM point, in which case it is $GO_2(\mathbb Q_\ell)$.
Since there are infinitely many CM points, one cannot view this as an algebraic family in the usual way. 
However, as there are only countably many CM points, this fits with Donu Arapura's answer - $G_s$ is constant outside a countable family of proper algebraic sub varieties, in this case points.
